BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XML DOM
How to remove an attribute with XmlDocument and RemoveAll?
How to create a navigator with XmlDocument and CreateNavigator?
Whats the 'push model'?
Hybrid Model Part Two: Choosing between SAX and DOM


 
 

<< XHTMLXmlSerializer >>


By Sonu Kapoor
First Posted 02/20/2005
Times viewed 2382

How to Load a XML From a String with XmlDocument?


Summary How to Load a XML From a String with XmlDocument?

Sometimes you don't want to load a XML file from a XML file, mainly because you don't have the XML file. Instead you have a string filled with some XML elements. The known Load function can not be used for that purpose because it accepts only the filename and not a string. Luckily there is a LoadXml function which accepts a string as a parameter. The xml string must be well formed and valid otherwise you will get a System.Xml.XmlException. The following code illustrates the usage of the LoadXml function.

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XHTMLXmlSerializer >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML