[jdom-interest] DOMOutputter removes entities

Yoon, Joe jyoon at ets.org
Mon Jun 3 13:35:54 PDT 2002

Upon further testing, the entities are NOT removed. Instead, when I output
the XML using the following code:

        org.apache.xml.serialize.XMLSerializer serializer = new

this is the result:

<!ENTITY Circle SYSTEM "circle.gif" NDATA eps>
<?xml version="1.0"?>
<!DOCTYPE item SYSTEM "sentence_completion_wrapper.dtd">

Somehow, the entity declaration is at the beginning.

Checking out the JDOM doc using:

        XMLOutputter xmlout = new XMLOutputter();


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE item SYSTEM "sentence_completion_wrapper.dtd" [

<!ENTITY Circle SYSTEM "circle.gif" NDATA eps>

Which is correct. So, converting from JDOM to DOM seems not to work

Using b8. 

-----Original Message-----
From: Yoon, Joe 
Sent: Monday, June 03, 2002 11:50 AM
To: 'jdom-interest at jdom.org'
Subject: [jdom-interest] DOMOutputter removes entities

Doing the following removes all the entities from the DOCTYPE declaration.

    public org.w3c.dom.Document convert(org.jdom.Document jdomDoc) throws
JDOMException, IOException {
        org.jdom.output.DOMOutputter outputter = new DOMOutputter();
        org.w3c.dom.Document domDoc = outputter.output(jdomDoc);
        return domDoc;

Any suggestions would be appreciated.

This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom 
it is intended, even if addressed incorrectly. If you received this e-mail 
in error, please notify the sender; do not disclose, copy, distribute, or 
take any action in reliance on the contents of this information; and delete 
it from your system. Any other use of this e-mail is prohibited. Thank you 
for your compliance.

More information about the jdom-interest mailing list