[jdom-interest] JDOM Entity references for special characters
svedec at kava.be
Thu May 26 02:02:15 PDT 2005
I've encountered the following problem in a project I'm working on :
1. When I parse an XML-file with the following special characters : “ test valid zone ”
they obviously have to be referenced in the DTD, otherwise the JDOM parser will give an exception.
2. In the DTD I've included the following W3C .ent-files : "xhtml-lat1.ent", "xhtml-special.ent" and "xhtml-symbol.ent" as recommended in "XML in a nutshell" (O'Reilly)
3. The file now is correct according to XMLSpy
4. When I start parsing it with JDOM, in order to generate INSERT-statements for a MySQL Database, these Entities are *translated* to gibberish : â€œ test invalid zone â€?
5. When I explicitly put them in my DTD : <!ENTITY ldquo "[ldquo ]"> they are translated to [ldquo ] in the INSERT statement.
My question : how can I tell JDOM to just check if the Entity is ok, and then DON'T translate it.
Thank you on beforehand,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest