Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - RE: MSXML Save Method Questions [Thread Next] Re: MSXML Save Method QuestionsTo: NULL Date: 3/2/2006 1:37:00 PM
mckkwan wrote:
> I mean it will convert from "& # x e 9 ;" to "é", which I do not want to.
If you stay with US-ASCII e.g.
Dim XmlDocument
Set XmlDocument = CreateObject("Msxml2.DOMDocument.4.0")
XmlDocument.appendChild _
XmlDocument.createProcessingInstruction(_
"xml", "version=""1.0"" encoding=""US-ASCII""")
XmlDocument.appendChild xmlDocument.createElement("text")
XmlDocument.documentElement.appendChild(_
XmlDocument.createTextNode(_
"Je suis fatigué."))
XmlDocument.save "test2006030201Saved.xml"
then MSXML saves as a numeric character reference
<?xml version="1.0" encoding="US-ASCII"?>
<text>Je suis fatigué.</text>
but as you can see it chooses & # 2 3 3 ;, the decimal value, while you
want the hex value it seems. I don't think there is any way to achieve
what you want with direct calls to MSXML APIs, you would need to write
your own serializer then to make sure those characters you want as
hexadecimal numeric chacracter references are serialzied that way.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
