Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - How to configure MSXML2::IXMLDOMDocument to emit UTF8 entities instead of UTF16 characters and indent >Thread Next - Re: How to configure MSXML2::IXMLDOMDocument to emit UTF8 entities instead of UTF16 characters and indent Re: How to configure MSXML2::IXMLDOMDocument to emit UTF8 entities instead of UTF16 characters and indentTo: 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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
