Hi all

This may be considered by _some_ as NF, but here goes

I have the following code:

loXML = Createobject('MSXML2.DomDocument')
loXML.loadXML(lcXML)
lcolElements = loXML.GetElementsByTagName("Bank")
For Each loElement In lcolElements
        ? loElement.Attributes.Item(0).Text
        Etc/usw

Part of the XML looks like this

<Bank id="1" name=" None" styleid="0" ></Bank>  Note the leading space

The code above returns "None" - without the leading space.  I have tried 
replacing the leading space with &#32; but it is still stripped off.  I tried 
replacing the leading space with &nbsp; and the XML fails to load at all.

loXML.PreserveWhiteSpace = .T.  seems to apply to all white space not just that 
between the quote marks and that messes things up completely.

Any ideas/suggestions would be much appreciated

Paul Newton

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to