[jdom-interest] help

Gu Xueying (Shinnie Gu) Shinnie.Gu at iuniverse.com.cn
Tue Jul 2 18:42:22 PDT 2002


encoding is UTF-8.
All the procedure is first read from a xml named A with UTF-8 encoding and
then get some element's content
and put them in another xml named B. Third read xml B. The problem appears
in the third step. And the charaters
is ≵ ≴.They will be first turned into smart quote and put in xml
B, then when we read B xml ,exceptions appear.
Could you give me some advise?

Shinnie Gu
IUniverse(Shanghai)Co.,Ltd.
Tel:8621-58305001 Ext.8701



-----Original Message-----
From: Alex Rosen [mailto:arosen at silverstream.com]
Sent: 2002年7月2日 22:27
To: Gu Xueying (Shinnie Gu); jdom-interest at jdom.org
Subject: RE: [jdom-interest] help


What is the character set of your file, and what is the encoding that's
declared in your XML declaration? Also, what are the first few bytes of your
file - is there anything that comes before the <?xml ... ?> statement?

Alex

> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Gu Xueying (Shinnie
> Gu)
> Sent: Tuesday, July 02, 2002 4:06 AM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] help
>
>
> hi,
> when I use jdom to build jdom document,such exception appears:
>
>
> Root cause: org.xml.sax.SAXParseException: UTF-8 char -- is
> an XML encoding
> declaration missing? at
> org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
>  at
> org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
>  at
> org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefi
> x(InputEntity.
> java:914)
>  at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1009)
>  at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:486)
>  at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>  at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
>  at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
>  at org.jdom.input.SAXBuilder.build(SAXBuilder.java:617)
>  at org.jdom.input.SAXBuilder.build(SAXBuilder.java:599)
>  at
> com.iuniverse.ctp.builder.XMLCoverBuilder.getDocument(XMLCover
> Builder.java:1
> 109)
>  at
> com.iuniverse.ctp.builder.XMLCoverBuilder.buildCover(XMLCoverB
> uilder.java:10
> 3)
>  at com.iuniverse.ctp.builder.Drawer.pdflibDraw(Drawer.java:123)
>  at BuilderTest.main(BuilderTest.java:50)
>
> In fact there is already a XML encoding on the head of the xml.
> Any help is appreciated.
> Thanks!
> Shinnie Gu
> IUniverse(Shanghai)Co.,Ltd.
> Tel:8621-58305001 Ext.8701
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com



More information about the jdom-interest mailing list