对方返回一个这样的XML,请教如何转换为数组.我试过了SimpleXML但是它不认<soap:Envelope ... 这个命名空间.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<wfjlResponse xmlns="http://test">
<wfjlResult>
<NewDataSet>
<finally>
<中文1>测试1</中文1>
<中文2>测试2</中文2>
<中文3>测试3</中文3>
</finally>
</NewDataSet>
</wfjlResult>
</wfjlResponse>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<wfjlResponse xmlns="http://test">
<wfjlResult>
<NewDataSet>
<finally>
<中文1>测试1</中文1>
<中文2>测试2</中文2>
<中文3>测试3</中文3>
</finally>
</NewDataSet>
</wfjlResult>
</wfjlResponse>
</soap:Body>
</soap:Envelope>