How does one tell the XML parser to honor leading and trailing whitespace?
Dim xml: Set xml = CreateObject("MSXML2.DOMDocument")
xml.async = False
xml.loadxml "<xml>1 2</xml>"
wscript.echo len(xml.documentelement.text)
Above prints out 3.
Dim xml: Set xml = CreateObject("MSXML2.DOMDocument")
xml.async = False
xml.loadxml "<xml> 2</xml>"
wscript.echo len(xml.documentelement.text)
Above prints out 1. (I'd like it to print 2).
Is there something special I can put in the xml document itself to tell the parser to keep leading and trailing whitespace in the document?
CLARIFICATION 1: Is there an attribute that can be specificed ONCE at the beginning of the document to apply to all elements?
CLARIFICATION 2: Because the contents of the entities may have unicode data, but the xml file needs to be plain ascii, all entities are encoded -- meaning CDATA's unfortunately are not available.