phpxmlhtmlspecialcharsxml-entities

Un-Escaping XML encoded characters


Hi I got response as like instead of STD xml. How Can i convert it into XML by using PHP ..

    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><rfc:ZHR_TIMESHEETS_GETLIST.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><ZDAYSUMMARY></ZDAYSUMMARY><ZMESSAGES><item><MANDT></MANDT><PERNR>00956025</PERNR><WKSTRTDT>0000-00-00</WKSTRTDT><WKENDDT>0000-00-00</WKENDDT><ZDAY>0</ZDAY><ZMESSAGE>E</ZMESSAGE><ZCOLOR_CODE></ZCOLOR_CODE><ZMESSAGE_T>You have no reportees.</ZMESSAGE_T></item></ZMESSAGES><ZTSDETAIL></ZTSDETAIL><ZWKSUMMARY></ZWKSUMMARY></rfc:ZHR_TIMESHEETS_GETLIST.Response></SOAP-ENV:Body></SOAP-ENV:Envelope> 

Thanks, Mangesh


Solution

  • try this:

    html_entity_decode("your_string")