[jdom-interest] Urgent: Unicode character not being displayed...
John L. Webber - Jentro AG
John.Webber at jentro.com
Sun Jun 9 23:39:22 PDT 2002
Rajesh, I think you'll find the answer to this in the FAQ:
http://www.jdom.org/docs/faq.html
See "Why does my file encoding on output not match the encoding on
input?"
If you need more help with this, feel free to send me a mail.
Regards,
John
"Pandia, Rajesh" wrote:
>
> 1. Here is my message format that I am trying to parse:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <Pip0A1FailureNotification>
> <ActionControl>
> <ActionIdentity>
>
> <GlobalBusinessActionCode>Zürich</GlobalBusinessActionCode>
> </ActionIdentity>
> </ActionControl>
> </Pip0A1FailureNotification>
>
> 2. Here's the code to parse
> public void doIt() throws JDOMException
> {
> org.jdom.input.SAXBuilder builder = new
> SAXBuilder(DEFAULT_SAX_DRIVER_CLASS);
> Document doc = builder.build(fileName);
> //System.out.println(doc+": Doc");
>
> Element root = doc.getRootElement();
>
> String GlobalBusinessActionCode =
> doc.getRootElement().getChild("ActionControl").getChild("ActionIdentity").ge
> tChildTextTrim("GlobalBusinessActionCode");
> System.out.println("GlobalBusinessActionCode:
> "+GlobalBusinessActionCode);
> }
--
---------------------------------------------------------
Jentro AG
John L. Webber, Software Development
---------------------------------------------------------
Peter-Henlein-Strasse 28, 85540 Haar/Munich, Germany
Tel. +49 89 462 385 0 mailto:John.Webber at jentro.com
Fax +49 89 462 385 29 http://www.jentro.com
---------------------------------------------------------
More information about the jdom-interest
mailing list