Reputation: 783
I am not very old in android development, for the first time I am using XML parsing I am using this tutorial for the parsing the following file that i want to read in a tree structure, I am not able to get some tutorial to parse the file of my requirements
<?xml version="1.0" encoding="UTF-8"?>
<Items>
<ItemData>
<title>Fruit</title>
<level>1</level>
<ItemData>
<title>Apple</title>
<level>2</level>
</ItemData>
<ItemData>
<title>Mango</title>
<level>2</level>
</ItemData>
<ItemData>
<title>Banana</title>
<level>2</level>
</ItemData>
</ItemData>
<ItemData>
<title>Vegitables</title>
<level>1</level>
<ItemData>
<title>carrot</title>
<level>2</level>
</ItemData>
<ItemData>
<title>spinach</title>
<level>2</level>
</ItemData>
</ItemData>
</Items>
I just need guidance and sample code to implement my required functionality. I shall be very grateful.
Upvotes: 0
Views: 1308
Reputation: 596
Well, in that case I think you can use one of the following parser resources to check out a working sample:
Hope above helps. It might help if you post some of errors you are facing?
Upvotes: 2