Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to configure MSXML2::IXMLDOMDocument to emit UTF8 entities instead of UTF16 characters and indent

From: "Anthony Jones" <AnthonyWJones@------------.--->
To: NULL
Date: 12/29/2008 11:06:00 AM
"Siegfried Heintze" <siegfried@h...> wrote in message 
news:eBDzLdUaJHA.1528@T......
> What function do I call to make MSXML2::IXMLDOMDocument indent when I call 
> save. How do I make save emit #&nnnnnn; in UTF8 instead of UTF16?
>

I'm not sure I understand this.  Without an encoding in the xml declaration 
MSXML DOM will default to UTF-8.  So it should be saving as UTF-8 already.

OTH if you are accessing the XML property that will be unicode since it 
returns a COM BSTR.

> How do I make it emit an XML header?
>

You need to add the XML header yourself by creating a Processing 
instruction.  Here is the code in VBScript (my C++ is a bit rusty but I'm 
sure you can port it):-

 oDOM.insertBefore oDOM.createProcessingInstruction("xml", "version=""1.0"" 
encoding=""UTF-8"""), oDOM.documentElement


-- 
Anthony Jones - MVP ASP/ASP.NET



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent