android - How we can parse OPML String -


i got following string response when post url via httppost. problem how can parse string.

<?xml version="1.0" encoding="utf-8"?>  <opml version="1">      <head>     <status>200</status>         </head>      <body>  <outline type="object" text="account">  <account>    <guide_id>u36710162</guide_id>    <username>xyz</username>    <session_id>9d28d854-bd31-4bba-9a5f-4e5cd88edaac</session_id>    <first_name />    <last_name />    <email>xyz@gmail.com</email>  </account>  </outline>      </body>  </opml> 

how can status, guide_id, username, session_id, first_name, last_name , email string.

thanks in advance ...!!!

it xml format response. can parse saxparser, domparser or xmlpullparser.

about status can http itself

httpclient httpclient = new defaulthttpclient(); httpresponse response = httpclient.execute(httprequest); response.getstatusline().getstatuscode() 

note: consider <account> parent tag.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -