pedro84 Posted January 9, 2010 Share Posted January 9, 2010 Good day, I use oempro software and try to parse XMLReturn but it's not working for me, simplexml_load_string return tons of errors. Maybe someone could help me? pending.php?XMLReturn=<%3Fxml version%3D"1.0" encoding%3D"utf-8"%3F><response><Success><![CDATA[1]]><%2FSuccess><ErrorCode><![CDATA[0]]><%2FErrorCode><SubscriberID><![CDATA[11]]><%2FSubscriberID><RedirectURL><![CDATA[http%3A%2F%2Fflivoo.com%2Fcustomers%2Fmario%2Fpending.php]]><%2FRedirectURL><%2Fresponse> This is how the GET string looks, how to parse it? Link to comment https://forums.phpfreaks.com/topic/187831-parse-xml/ Share on other sites More sharing options...
spfoonnewb Posted January 9, 2010 Share Posted January 9, 2010 For examples sake (e.g. you're going to want to have validation for security): <?php if (!empty($_GET['XMLReturn'])) { $queryString = urldecode($_GET['XMLReturn']); $xml = simplexml_load_string($queryString); header("content-type: text/xml"); echo $xml->asXML(); } else { echo "XML Undefinded."; } ?> Link to comment https://forums.phpfreaks.com/topic/187831-parse-xml/#findComment-991725 Share on other sites More sharing options...
pedro84 Posted January 9, 2010 Author Share Posted January 9, 2010 Thanks for reply. Was really quite to do this. Cheers! Link to comment https://forums.phpfreaks.com/topic/187831-parse-xml/#findComment-991776 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.