carsey88 carsey88 - 1 year ago 118
Android Question

Getting SAX Parser attributes value

I am parsing XML from the web using Android. The code below shows a sample of the XML. The problem I'm having is I can't get the string value of the item tag. When I use

name = attributes.getQName(i);
it outputs the name, not the value of the attribute.

<item name="date">
<description>The current date</description>

Any help is much appreciated.

Answer Source



instead of


because as doc says :

getQName :Return an attribute's qualified (prefixed) name.

getValue : Look up an attribute's value by qualified (prefixed) name.

see this example for getting attribute name and value

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download