Parse XML from URL PHP4

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
javi_arboleya
Forum Newbie
Posts: 6
Joined: Thu Mar 30, 2006 2:46 am

Parse XML from URL PHP4

Post by javi_arboleya »

Hi,

I would like to know what's the best way to parse a xml document directly from a url.

My problem is that I need to access a url and get the xml document that gives me, and then parse it in order to get a code.

How would I do this?

thanks in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

file_get_contents() or similar the page data and call xml_parse() I believe.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

There is a parse_into_struct or parse_into_array function if you don't want to parse it yourself....
Post Reply