Does anyone know how to set the encoding of an XmlDocument object?
I am building and modifying an XML DOM in a java program heavily working with the XML API with no problems (except truly ghastly coding). But when I write the XML to a file and open the it in a text editor, the document structure is well-formed and valid except that the encoding is set (by the java XML processor apparently) to cP1252:
[red]<?xml version="1.0" encoding="Cp1252"?>[/red]
I can change this encoding manually to:
[red]<?xml version="1.0" encoding="windows-1252"?>[/red]
or
[red]<?xml version="1.0" encoding="iso-8859-1" ?>[/red]
and the document will then show up in a IE but that is not a very good solution. I don't know much about encodings but if anyone know how to set this from the java application or any other related suggestions, I would appreciate it greatly.
I've looked through the com.sun.xml.tree API and can't find anything that looks like a possible method. [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]
I am building and modifying an XML DOM in a java program heavily working with the XML API with no problems (except truly ghastly coding). But when I write the XML to a file and open the it in a text editor, the document structure is well-formed and valid except that the encoding is set (by the java XML processor apparently) to cP1252:
[red]<?xml version="1.0" encoding="Cp1252"?>[/red]
I can change this encoding manually to:
[red]<?xml version="1.0" encoding="windows-1252"?>[/red]
or
[red]<?xml version="1.0" encoding="iso-8859-1" ?>[/red]
and the document will then show up in a IE but that is not a very good solution. I don't know much about encodings but if anyone know how to set this from the java application or any other related suggestions, I would appreciate it greatly.
I've looked through the com.sun.xml.tree API and can't find anything that looks like a possible method. [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]