I encountered another problem when reading xmlsoap using php. could you please help me solve this problem? there is an xml file in a strange format. maybe I have never touched on such a file, XMLcode & lt ;? Xmlversion = & quot; 1.0 & quot; encoding = & quot; UTF-8 & quot; use php to read xml soap
I encountered another problem. please help me solve it.
There is an xml file in a strange format. maybe I have never touched this file.
XML code
Order_flag = 0 & Name_num = 2077 & StartCity = SZX & EndCity = PEK & Dates = 2012-5-31 & ...... there is a lot of such data behind it.
How can I read such files?
------ Solution --------------------
Parse it as xml using simplexml
PHP code
Order_flag = 0 & Name_num = 2077 & StartCity = SZX & EndCity = PEK & Dates = 2012-5-31 & ...... there is a lot of such data behind it.
SOAP; $ xml = simplexml_load_string ($ soap); $ result = $ xml-> children ('http: // schemas.xmlsoap.org/soap/envelope/')-> children ('http: // tempuri.org /') -> QueryResponse-> QueryResult; echo $ result; // Order_flag = 0 & Name_num = 2077 & StartCity = SZX & EndCity = PEK & Dates = 2012-5-31 &....... there is a lot of such data.