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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Reader! 1

Status
Not open for further replies.

Antzz

Programmer
Jan 17, 2001
298
US
Hi Guys,
Can you let me know if any of the XML reader classes provided in .Net can read and parse from a string variable vs an XML file?

Thanks and appreciate it.
 
using System;
using System.IO;
using System.Xml;

1. create a NameTable object;
2. create a XmlNamespaceManager object associated to NameTable obj
3. Call AddNamespace() to add the namespaces defined in the xml string
4. create a XmlParserContext object associated to XmlNamespaceManager object
5. create a XmlTextReader object associated to the context object and pass the xml string in
the constructor
6. Travers the xml string using the XmlTextReader object

-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top