1

Possible Duplicate:
Android: How we can get the value from attribute from xml string

I have the following string. I want to be parse the attribute of outline.

<opml version="1">
<head>
<status>200</status>
</head>
<body>
<outline type="text" text="General" guide_id="f1" is_default="true"/>
<outline type="text" text="Rock Stations" guide_id="f2"/>
<outline type="text" text="Rock Stations" guide_id="f3"/>
<outline type="text" text="Rock" guide_id="f4"/>
<outline type="text" text="Awdhesh" guide_id="f5"/>
</body>
</opml>

How I can parse attribute and take the value of text and guide_id. Which parser I can use to do this?

Community
  • 1
  • 1
  • This is Q/A site not code generation site, so dont ask for codes,rather ask for hints and guideline for the same,or you will get negative vote and also the question might get close, [Read More](http://stackoverflow.com/faq) – MKJParekh Jun 13 '12 at 05:05

1 Answers1

0

Use Dom Parser for that, Below is Link of Dom Parser Example.

Dom Parsing

Dipak Keshariya
  • 22,193
  • 18
  • 76
  • 128
  • This xml is not same as that xml which is provide by me. Can you provide any some guideline for parsing type, text and guide_id ...!!! –  Jun 13 '12 at 05:13
  • In Above Example link, the "category" is same as type, text and guide id, so use that type of parsing to parse type, text and guide id. – Dipak Keshariya Jun 13 '12 at 05:23