Android XML parsing with complex data Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Android XML parsing with complex data without wasting too much if your time.

The question is published on by Tutorial Guruji team.

i know this might be a simple question of parsing an xml in android

here what my response is..

<Output>
<category>
  <maincategory id="196">300mm x 300mm (12" x 12")</maincategory>
    <subcategory>
      <category id="206">Anti Skid Sp. Color Series</category>
      <category id="199">Ivory Matt Series</category>
   </subcategory>
</category>
<category>
 <maincategory id="195">395mm x 395mm (16" x 16")</maincategory>
  <subcategory>
   <category id="198">Cloudy Series</category>
   <category id="197">Plain Color Series</category>
 </subcategory>
 </category>
</Output>

can i anyone provide a link for this type of parsing. i want id and name of the category from this response.

i have already tried this: 1)http://theopentutorials.com/tutorials/android/xml/android-simple-xmlpullparser-tutorial/ and 2)xml parse example 3)http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/

Thanks in Advance. Answer will be appreciated

Answer

Try with a dom parser, here’s an example: http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser

We are here to answer your question about Android XML parsing with complex data - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji