vurentjie Posted November 8, 2008 Share Posted November 8, 2008 hi, i am having a problem with some xml i am retrieving from another site, and i just dont know how to extract the data this is what the print of the xml looks like SimpleXMLElement Object ( [@attributes] => Array ( [version] => 1.0 ) [header] => SimpleXMLElement Object ( ) [data] => SimpleXMLElement Object ( [string] => Complete0Complete3ca5f1ae-1c91-41f3-be49-063bf2be2d7908/11/2008 2:10:05 AM [email protected]: 2 - [email protected] - etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc ) ) basically i am stuck as all the data is coming back as one long string that i cannot separate into individual objects, i was expecting something more like SimpleXMLElement Object ( [info] => SimpleXMLElement Object ( [status] => Complete ) [from] => Jani [Address] => 10 Essen Rd [Product] => Chips ) which i could extract quite easily, is there a problem with how i am retrieving the data?? I have tried both SimpleXMLElement and simplexml_load_string; Funnily if i echo the xml return before loading it with one of the above functions it returns as regular xml starting like this... <?xml version='1.0' encoding='UTF-8'?><order_synchro><outcome><status>Complete</status><error_code>0</error_code><error_desc>Complete</error_desc><error_solution/><order> etc stumped. Link to comment https://forums.phpfreaks.com/topic/131868-xml-testing/ Share on other sites More sharing options...
vurentjie Posted November 8, 2008 Author Share Posted November 8, 2008 i found my problem solved Link to comment https://forums.phpfreaks.com/topic/131868-xml-testing/#findComment-685075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.