11Tami Posted January 18, 2007 Share Posted January 18, 2007 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 More sharing options...
11Tami Posted January 18, 2007 Author Share Posted January 18, 2007 nevermind, found something else to help. Link to comment https://forums.phpfreaks.com/topic/34702-pulling-data-from-an-xml-file/#findComment-163551 Share on other sites More sharing options...
genericnumber1 Posted January 18, 2007 Share Posted January 18, 2007 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). Link to comment https://forums.phpfreaks.com/topic/34702-pulling-data-from-an-xml-file/#findComment-163553 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.