[jdom-interest] about xml encoding!

Jason Hunter jhunter at servlets.com
Thu Apr 11 21:45:37 PDT 2002

If you're using Xerces you may need to set the
http://apache.org/xml/features/allow-java-encodings feature to true. 
See http://xml.apache.org/xerces-j/features.html.  The builders let you
pass through calls like this to the parser.  That feature lets Xerces
understand all Java supported encodings.  I'm not sure GBK is supported
by Java, but if not, you can probably find a way to encode it using one
of the others like GB2312.


r shangw wrote:
> hi;
> i'm using jdom-8b now.i met a problem:
> org.jdom.JDOMException: Error on line 3 of document
> file:/D:/bea61/wlserver6.1/test_report.xml: An
> nvalid XML character (Unicode: 0xb2) was found in the
> element content of the document.
>         at
> org.jdom.input.SAXBuilder.build(SAXBuilder.java:363)
>         at
> org.jdom.input.SAXBuilder.build(SAXBuilder.java:707)
>         at
> org.jdom.input.SAXBuilder.build(SAXBuilder.java:689)
> I use chinese word in the xml file and set
> encoding="GBK", but it seems jdom can't recognize that
> . HOW CAN I DO NOW ???
> thanks advance!
> _________________________________________________________
> Do You Yahoo!?
> 30 ÕÅÃâ·ÑÊÀ½ç±­ÇòƱ 7 ÌìËÍÍ꣡ÓÐÖÖÄã¾Í¿ìÀ´ÇÀ£¡
> http://cn.promo.yahoo.com/49/
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

More information about the jdom-interest mailing list