Jump to content

pulling data from an xml file.


11Tami

Recommended Posts

Hi, I need to know how to pull data from an xml file with php.
For example, lets say I have a form field. When an xml file internet address is put into the form field and the "submit" button is pushed, I need to have just some of the xml fields appear on the page. Anyone have any basic code to get me started? I have no idea where this starts. I already know how to make forms I  just don't know how to pull the data to populate the form fields. Thank you very much.
Link to comment
https://forums.phpfreaks.com/topic/34702-pulling-data-from-an-xml-file/
Share on other sites

Saw you said nevermind but my post was already written so I'll still post it for people that search the forums for the same question...

To get the contents of a URL you can do [url=http://www.php.net/file_get_contents]file_get_contents()[/url] as for parsing the XML you might want to look into the [url=http://www.php.net/xml]XML[/url] and the [url=http://www.php.net/simplexml]Simple XML[/url] functions. There's also a [url=http://www.phpfreaks.com/tutorials/44/0.php]tutorial[/url] you could read (I'm sure it is wonderful, I just glanced at it).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.