How to get the value of an xml element from within a SOAP response? (Android)

pats

New Member
Here is the SOAP response:\[code\]<?xml version="1.0" encoding="utf-8"?><soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <SearchResponse xmlns="..."> <SearchResult> <?xml version="1.0" standalone="yes"?> <items blahblahblah1 </items> <?xml version="1.0" standalone="yes"?> <items blahblahblah2 </items> </SearchResult> </SearchResponse> </soap12:Body></soap12:Envelope>\[/code\]From within "SearchResult", I want to get each of the full xmls of "items" one at a time. What I mean is, I want to get an entire "items blahblahblah /items", individually. How do I do that?Here is what I've figured out using DOM to get all of the xml from within "SearchResult", but how do I get the items??\[code\]DocumentBuilder db = factory.newDocumentBuilder();InputSource inStream = new InputSource();inStream.setCharacterStream(new StringReader(soapResponse));Document doc = db.parse(inStream);NodeList nl = doc.getElementsByTagName("SearchResult");xml = nl.item(0).getFirstChild().getNodeValue();\[/code\]
 
Back
Top