Hi Guys.
I'm using PHP5 and it's inbuilt SOAP functionality. I'm catching the SOAP Fault errors, and email myself when one is triggered.
What I really need to do is include the __getLastRequest() and __getLastResponse(), however as these are XML objects, when I try to include them by echoing them into the body of my HTML email, for obvious reasons they don't appear in full.
Is there a function or class I can use to convert these objects into a HTML friendly string?
I've googled this but without any joy. If possible i'd like to avoid using a class external to PHPs own functionality but if needs must i'll have to.
EDITED:
How can I format the following XML so that it gives me an indented browser friendly version?
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="xxx.com/"><SOAP-ENV:Body><ns1:Ad… 0NE</ns1:Postcode><ns1:BuildingName></ns1:BuildingName><ns1:BuildingNo></ns1:BuildingNo><ns1:SubBuilding></ns1:SubBuilding><ns1:Organisation></ns1:Organisation><ns1:Street></ns1:Street><ns1:SubStreet></ns1:SubStreet><ns1:Town></ns1:Town><ns1:District></ns1:District></ns1:address><ns1:AccountName>[email protected]</ns1:AccountName><ns1:Password>password</ns1:Password></ns1:AddressLookupUK></SOAP-ENV:Body></SOAP-ENV:Envelope>