How do I parse an external XML file (returned from a POST) with php?

undessrex

New Member
I have a simple code written (based on some tutorials found around the internet) to parse and display an XML file. However, I only know how to reference an XML file stored on my server and I would like to be able to use an XML file that is being returned to me from a POST. Right now my code looks like this:\[code\]if( ! $xml = simplexml_load_file('test.xml') ){ echo 'unable to load XML file';}else{ foreach( $xml as $event) { echo 'Title: '; echo "<a href=http://stackoverflow.com/questions/2001301//"$event->url\">$event->title</a><br />"; echo 'Description: '.$event->info.'<br />'; echo '<br />'; }} \[/code\]Is there some way I can replace the simpleXML_load_file function with one that will allow me to point to the POST URL that returns the XML file?
 
Back
Top