<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><getSessionId xmlns="http://treecorp.corp:8080/MEENH/service"> <multiRef xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="apachesoap:Map"> <item> <key xsi:type="soapenc:string">Application</key> <value xsi:type="soapenc:string">MobileDevice</value> </item> <item> <key xsi:type="soapenc:string">Version</key> <value xsi:type="soapenc:string">1.0</value> </item> <item> <key xsi:type="soapenc:string">Username</key> <value xsi:type="soapenc:string">ramau</value> </item> <item> <key xsi:type="soapenc:string">token</key> <value xsi:type="soapenc:string"></value> </item> <item> <key xsi:type="soapenc:string">sessionID</key> <value xsi:type="soapenc:string">SESSIONID</value> </item> <item> <key xsi:type="soapenc:string">OSInformation</key> <value xsi:type="soapenc:string">windowsXP</value> </item> </multiRef> </getSessionId> </soap:Body> </soap:Envelope> This is my XML.
I want to parse this XML using Java and retreive a value based on the key . You can see in the XML there are lot of Key Value Pairs .
For Example if If I want to retrive value for Application I should get the value as MobileDevice. Like this kindly anyone help me to sort this issue.
Thanks in Advance.