Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IXMLDOMDocument2 loadXML where XML contains prohibited characters

Status
Not open for further replies.

dustfinger

Technical User
Aug 12, 2005
3
CA
I have an XML document contained in a BSTR and I want to load the xml document using the IXMLDOMDocument2. The problem is that one of the nodes of my XML has inner text that contains a less than sign. If I try to load the XML document using IXMLDOMDocument2->loadXML then it fails to load because of that prohibited character. In JavaScript when you have an MSXML object you can set the text property to a String containing prhibited characters and it will automatically encode them so that the xml document can be successfully parsed. So if I were to use MSXML.text = MyDocWithLessThanSign then it would encode the less than sign as &lt. Is there some sort of mechanism built into IXMLDOMDocument2 to handle nodes that have inner text containing prohibited characters such as < and &? What would be the best way of handling this situation?

Thank you in advance.

dustfinger.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top