How do I read a 250 Meg XML file?
How do I read a 250 Meg XML file?
Ok. A vendor is giving me a 250 Meg XML file. I am having a very difficult time reading this, because of the size. I keep getting memory errors in my application. Here is the basic code I am using to read this. I am sure that the xmlDoc.Load is reading the entire document into memory. What I need, is to read it a I go, not all at once. I can't figure out an Xml way of doing it. The only way I can think of to make this work, is to read the Xml file, as if it were a text file, one record at a time, and manually process the Xml. There has to be a better way, isn't there
XmlDocument xmlDoc =
new XmlDocument();
xmlDoc.Load(path);
XmlNode DataNode = xmlDoc.FirstChild;
DataNode = DataNode.NextSibling;
DataNode = DataNode.FirstChild;
DataNode = DataNode.FirstChild;
while(DataNode != null)
{
.
.
.
.
DataNode = DataNode.NextSibling;
}
How do I read a 250 Meg XML file?
Sebastian Wilczy?ski
Tomer Doron
bl22
ericch1
did you try the Dataset class with dataset.readxml and dataset.writexml