Log in

No account? Create an account

Previous Entry | Next Entry

On Vox: LazyVox - I don't know PHP.

What's the best way to parse XML in PHP? I've tried using DOMDocument(), but it's driving me up a fucking wall. The constructor doesn't seem to work as documented, and when I finally do get an object, using domxml_open_mem(string), the documented methods blow up. Hate hate hate hate.

If you're wondering what I'm doing, I just want to walk the items in this feed and pull out the value of the title node as well as the url attribute of the enclosure node. I was able to do it in Javascript using the browsers DOM parser, and would like an easy port.

Originally posted on pop.vox.com


( 2 comments — Leave a comment )
Feb. 21st, 2007 08:28 pm (UTC)
simpleXML in php5 is your friend
SimpleXML is your friend in 5. If not in 5, than there are a lot of php4 rewrites to use the simlair style of SimpleXML. Its dead easy.
Feb. 21st, 2007 09:16 pm (UTC)
Re: simpleXML in php5 is your friend
Thanks! I'll check it out!
( 2 comments — Leave a comment )