arianhojat Posted October 16, 2006 Share Posted October 16, 2006 i tried something like this...[code]$xml = simplexml_load_file('dynamicXML.php') or die ("Unable to load XML file!"); $yearEnd = $xml->someNode;[/code]i get a 'Unable to load XML file'. yet going to dynamicXML.php in my web browser returns a good xml result. any ideas? tried searching for loading dynamic xml into php, but couldnt find any articles suprisingly, is simplexml the way to go here? or do i have to serialize(dynamicXML.php) it into a variable before loading it with simplexml?Thanks in advance,Arian Quote Link to comment Share on other sites More sharing options...
rune_sm Posted October 16, 2006 Share Posted October 16, 2006 You have to use the load_string command if it's not an XML file.... Take a look at the example at the php.net site:http://dk2.php.net/simplexml Quote Link to comment Share on other sites More sharing options...
arianhojat Posted October 16, 2006 Author Share Posted October 16, 2006 Hey rune_sm,is this still the case when the webpage has a header of text/xml? can i just pass the php filename to load_string?or do i have to do any special functions on the file, somehow convert it to soemthing liek a file_get_contents be4hand? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.