[jdom-interest] Problem when creating document using xml String
with NCR format characters
per.norrman at austers.se
Fri Jul 2 02:20:55 PDT 2004
1) How do you convert the JDOM document to an XML string?
2) What is the actual Exception? 'Not valid' means that the document
fails to comply with a DTD or schema. If there are other errors, like
illegal characters or unbalanced tags, the document is not 'well formed'.
Zhiyong Zhang wrote:
> I have a xml document using UTF-8 encoding, which
> includes some characer using NCR format,like
> then i read this file (with encoding UTF-8) and
> generate the xml Java String (Java Unicode encoding).
> then i pass this xml String to the JDOM utility method
> to convert this xmlString to JDOM Document object. The
> codes looks like:
> SAXBuilder builder = new SAXBuilder();
> Document document = builder.build(new StringReader
> and then, i convert this document back to xml string
> and rebuild the document, jdom complained that this
> isnot an valid document. It seems that JDOM converting
> the NCR formatted character to other thing, and
> regards it as invalid document.
> any advice will be appreciate.
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> To control your jdom-interest membership:
More information about the jdom-interest