I have a fairly large xml file - 7G - to import into a symfony2 app, storing in mongodb.
Are there any symfony2 components, or preferred ways to do this?
I have a fairly large xml file - 7G - to import into a symfony2 app, storing in mongodb.
Are there any symfony2 components, or preferred ways to do this?
Try XMLReader
- http://www.php.net/manual/en/book.xmlreader.php .
As far as I know XMLReader
streams the file rather than reading the whole file in before doing anything with it.
From there you can convert it to a simplexml
object if you would prefer it like http://posterous.richardcunningham.co.uk/using-a-hybrid-of-xmlreader-and-simplexml
Not sure about a Symfony specific component though.