[jdom-interest] How to get the XML Decl with JDOM?

Fred Clewis clewisf at us.ibm.com
Mon Oct 29 11:57:49 PST 2001

thanks Alex,

I could not find a FAQ about how to get the XML decl information out of the
input XML with JDOM, only the one about how to set the outputter and writer
after you have it.  Did I miss it?

             >  -----Original Message-----
             > From: jdom-interest-admin at jdom.org
             > [mailto:jdom-interest-admin at jdom.org]On Behalf Of Fred
             > Sent: Sunday, October 28, 2001 2:11 PM
             > To: jdom-interest at jdom.org
             > Subject: [jdom-interest] How to get the XML Decl with JDOM?
             > I'm trying to fix an application to output in the same
encoding it
             > input.  I see from other posts that I should setEncoding on
             > XMLOutputter and associated writer.  What I'm trying to
figure out is
             > how to get the encoding value out of my input xml.
getContent() does
             > not give you the first PI (xml decl).  What is the JDOM
method to give
             > me either the encoding value or the entire xml decl PI?
             > Also, this forum advised me earlier that:
             >     "Xerces has a toggle to tell it to handle all
             > encodings"
             > Does anyone know where this might be and of it's usefulness
             > when wrapped
             > with JDOM?

More information about the jdom-interest mailing list