[jdom-interest] JDOM Entity references for special characters

Sven Deckers svedec at kava.be
Thu May 26 02:02:15 PDT 2005


Hello,

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,

Sven.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20050526/b3518c61/attachment.htm


More information about the jdom-interest mailing list