Well, I have worked with an example in which i parse an XML file which does not have the XML declaration. I then serialize it to a file with the DOMWriter setting the encoding to either UTF-8 or UTF-16 and the output file contains the XML declaration line with the correct encoding that was set.
I wonder if parsing an XML file and then serializing it and building a document from scratch and then serializing it makes a difference in the output encoding. -----Original Message----- From: Scott MacKay [mailto:[EMAIL PROTECTED] Sent: Friday, July 25, 2003 5:16 PM To: [EMAIL PROTECTED] Subject: Encoding header during writer Hello, I am playing around with some code based on the DOMPrint sample and am having a devil of a time getting the proper encoding indicator in the <?xml> statement. I know you can setEncoding() to UTF-8 on the DOMWriter you use to output the node. I have done that and when I getEncoding() it show UTF-8, but the char stream output still shows UTF-16 in the actual <?xml> line. This would be a document built from scratch. Would anyone have an example of building a document and then outputting it with the UTF-8 encoding? Thanks in advance! -Scott __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]