I\'ve a SOAP response in a var $soap_response like this:
Let me save a whole lot of trouble and help you with your dataset instead (I'm assuming this is your web service, if it isn't I apologize).
Instead of serializing the whole dataset, run it through this function first and return it as a string.
Public Function FormatDataSet(ByVal ds As DataSet)
Try
Dim xmlstream As New StringBuilder
Dim write As XmlWriter = XmlWriter.Create(xmlstream)
write.WriteProcessingInstruction("xml", "version='1.0' encoding='utf-8'")
ds.WriteXml(write)
Return xmlstream.ToString()
Catch ex As Exception
Return ex.Message
End Try
End Function
This will strip out .NET's schema and leave you with easily parsed XML (even SimpleXML will be able to parse it). You'll need System.Text and System.Xml
I was able to do it with SoapClient and __doRequest()
function. Zend_Soap_client also uses SoapClient. So I chose SoapClient.