Ok I am needing to parse thru this:http://pastebin.com/z8xe7nKX
and get the "<Cell><Data" for each of the items in the row.
everything i have tried doesn't work, anyone have a suggestion?
i am using $xml = simplexml_load_file('Book1.xml');
thanks,
For whatever reason, I find the [man]DOM[/man] classes/methods easier to use for that sort of thing, even if they're not called "simple". 🙂 The getElementsByTagName() methods of DOMDocument and DOMElement give you node lists you can iterate over via foreach().
I have truncated the XML data, but it could get into the hundreds of MBs.
So would it still be bennificial to go your route?
I do not know if there is any performance difference of note between the DOM extension and the SimpleXML extension. I am pretty sure, though, that either would be more efficient than some sort of scratch-built regular expression solution. 🙂
Can you show an example please?
http://www.lmgtfy.com/?q=php+dom+example
I just ended up using this http://www.ibm.com/developerworks/opensource/library/os-phpexcel/index.html