working with large xml files
-
I´m working with large xml files(about 100MB) and what I have to do is: - first validate the xml file against a schema - then insert data from the file to a database What is the most efficient way to do this? Can anyone help me with this?
cellardoor
-
I´m working with large xml files(about 100MB) and what I have to do is: - first validate the xml file against a schema - then insert data from the file to a database What is the most efficient way to do this? Can anyone help me with this?
cellardoor
Efficient at 100 megs may not be that big of an issue. System.Xml.XmlReader is the fast method for reading. System.Xml.XmlValidatingReader will validate.
File Not Found
-
I´m working with large xml files(about 100MB) and what I have to do is: - first validate the xml file against a schema - then insert data from the file to a database What is the most efficient way to do this? Can anyone help me with this?
cellardoor
-
Yeah, Ennis Ray Lynch, Jr. is right, you want to use a sax based reader like XmlReader because a DOM based reader like XmlDocument would be too slow.
/\ |_ E X E GG
Thanks I´ll try it
cellardoor
-
Efficient at 100 megs may not be that big of an issue. System.Xml.XmlReader is the fast method for reading. System.Xml.XmlValidatingReader will validate.
File Not Found
Using a DOM reader like XmlDocument is the standard way to read/edit xml documents (at least I think...) because you can use XPATH and stuff. However, if you read a 100MB xml document with a dom reader your program will be suddenly using 100MB of ram. I'm pretty sure you don't want that...
/\ |_ E X E GG
-
I´m working with large xml files(about 100MB) and what I have to do is: - first validate the xml file against a schema - then insert data from the file to a database What is the most efficient way to do this? Can anyone help me with this?
cellardoor
The following link should be helpful for the validation part: Validating XML Data with XmlReader[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook