Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a node value with XmlPullParser

Im trying to get values from an XML with the XmlPullParser but can't reach the values I want. The XML-structure is similar to the Android Strings.xml:

<string name="value"> 1 </string>

I can get "string", "name" & "value" from the XML but can't reach the actual value "1". It seems like the XmlPullParser only works for structures like this:

<value> 1 </value>

Do I need to use another parser or is there a way to reach "1" (the value above) in some way?

Thanks!

like image 262
DecodeGnome Avatar asked Dec 03 '22 06:12

DecodeGnome


1 Answers

nextText() method will do the trick

like image 60
k7k0 Avatar answered Jan 04 '23 14:01

k7k0