Ideally the XML serialiser should check each character to see that it is
in the character set supported for the output encoding. Unfortunately, prior to
JDK 1.4, this was very tedious. That leaves two
alternatives:
a) use
character entities for all characters not in basic ASCII, which would irritate
many people and conceivably still fail for some character
encodings.
b)
assume that the user will choose an encoding which contains all the characters
they use. Many people use UTF-8 for this reason --- it supports all
characters.
-----Original Message-----
From: Scott Moore [mailto:[EMAIL PROTECTED]
Sent: 23 May 2002 16:11
To: Xerces J User (E-mail)
Subject: Escaping ●I'm performing a transformation which includes the character entity ● in it. The resulting transformation is correct and works fine. However, I then save the resultant XML file to disk for later processing. When I save it to disk, the ● turns in a question mark ?, which is obviously not the same character.How do I fix the following code to get it to output ● instead of a question mark when the XML is saved to a file?OutputFormat format =
new OutputFormat(getDocument()); //Serialize DOM
XMLSerializer serial = new XMLSerializer(writer, format);
serial.asDOMSerializer(); // As a DOM Serializerserial.serialize(getDocument());Thanks for any help!Scott
