Need help dealing with a large (18MB) XML file...
Posted: Fri Dec 26, 2003 9:47 pm
I need to get some information out of a microsoft project database (Project files can be stored as XML). One problem, project doesn't put line breaks or anything in its XML file so all of the data ends up being on one line
The other problem, I've never really had a problem loading a whole XML file into memory before. Normally, I just load the whole file into memory, parse it into an array or whatever I need to do with it and everything is fine...
But in this case, running xml_parse_into_struct takes over 10 minutes to process
This might be related to the fact that the file has no line breaks, but I'm not sure.
Is there a way to process an xml file little by little instead of loading the whole thing into memory? If so, can you give an example showing how to do it?
The other problem, I've never really had a problem loading a whole XML file into memory before. Normally, I just load the whole file into memory, parse it into an array or whatever I need to do with it and everything is fine...
But in this case, running xml_parse_into_struct takes over 10 minutes to process
Is there a way to process an xml file little by little instead of loading the whole thing into memory? If so, can you give an example showing how to do it?