?
Solved

Reading XML Data

Posted on 2007-11-30
2
Medium Priority
?
205 Views
Last Modified: 2013-11-07
Im trying to process data from a very large XML file from a file system... I was looking at XmlValidatingReader but someone said it was out dated. Whats faster?

XmlValidatingReader
XmlTextReader
XMLNodeReader

Someone said use the "XMLReader class and call the Create method to create a new instance" but not sure why
0
Comment
Question by:cybernation989
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 20381103
xmltextreader is faster. It reads one element at a time.
The Create method opens a new stream, the use Read to read one element, use a while to iterate though all elements. This will process any-size xml with maximum performance.
0
 
LVL 3

Expert Comment

by:wizrr
ID: 20381138
Create method is factory method and used to create appropriate instance of XmlReader depending on your stream and parameters. There can be any type of streams (network, or file system) with any encoding. Created XmlReader class will depend on parameters you passed here. That can be XmlTextReaderImpl without validation, with Dtd validation, or XsdValidatingReader. Encoding will be determined automatically.

You always can use Lutz Roeder's .NET Reflector and disassembly .NET code in any language you want, to know what method actually does.

Good luck.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question