xydev
xydev

Reputation: 3409

Parse xml data which is stored as string

    <?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><loginResponse xmlns="https://comm1.get.com/"><loginResult>true</loginResult><result>success</result></loginResponse></soap:Body></soap:Envelope>

Is there a way to parse a string which has xml data?

i want to get the result success

Upvotes: 0

Views: 559

Answers (2)

Sebastian Roth
Sebastian Roth

Reputation: 11537

This is a SOAP response and you might want to try this library: http://ksoap2.sourceforge.net/

It claims to be useful for small / limited environments like phones.

If you can use it then there is no need to write another parser in SAX,DOM,Xmlpull etc etc.

Upvotes: 1

Labeeb Panampullan
Labeeb Panampullan

Reputation: 34823

Since you have a very small xml to parse its better to use dom parser here.
Also refer SAXParser

Upvotes: 0

Related Questions