What are some ways of parsing XML data using different objects?
// Opens the input and output files as streams
FileStream stream = File.Open("myxmldata.xml", FileMode.Open);
// Uses a new Dataset object and
// fills it with data from the .xml file
DataSet ds = new DataSet();
ds.ReadXml(stream);
// Uses a new instance of the XMLTextReader object
XmlReader reader = new XmlTextReader(stream);
// Uses a new XmlDocument object and
// fills it with data
XmlDocument document = new XmlDocument();
document.Load(stream);
Back to XML FAQ
Sponsored links
Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Web based bug tracking - AdminiTrack.com
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.
Free White Paper: Accelerate Enterprise Apps 2500%
Sign up to learn how solid state disks boost application speed for lots more transactions and users.
Sign up to learn how solid state disks boost application speed for lots more transactions and users.
Free DB Modeling Trial with ER/Studio
Design and Build More Powerful Databases with ER/Studio.
Design and Build More Powerful Databases with ER/Studio.
