Skip to content Skip to sidebar Skip to footer

Pull Parsing Local Xml File In Android

I'm trying to parse specific parts of a local XML using pull-parsing however, I'm not sure how I read those parts. I'm using the code: package com.example.xmltest; import java.io

Solution 1:

If I understand this correctly the problem here is that you have no value in your XML. You do however have some tags with attributes in them.

Ex:

<ayaindex="6"text="Guide us to the straight path -"/>

is not the same as:

<ayaindex="6">Guide us to the straight path -"</aya>

The later of these two would probably work with your code. What I think you want is to read the attribute text and not the value of the tag.

You will find further information on how to fetch the attributes here.

Hope it helps.

Post a Comment for "Pull Parsing Local Xml File In Android"