Questions tagged [android-xmlpullparser]

XmlPullParser is an efficient and maintainable way to parse XML on Android.

XML Pull Parser is an interface that defines parsing functionality provided in XMLPULL V1 API

http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html

Example can be found at http://developer.android.com/training/basics/network-ops/xml.html

108 questions
1
vote
0 answers

Unable to parse XML data from the Source code (via View Source) of a webpage

I have been working on a RSS Reader app. Till now I have learned to parse xml data from web and display needed data. I used Busy Coder's Guide and tutorials from Derek Banas to study this topic and built a Stock Quote reader. Anyways, I wanted to…
Sahil Dave
  • 433
  • 1
  • 7
  • 15
1
vote
1 answer

Xmlparser.getText() is giving null

I'm trying to pull values from a preset xml file and I keep getting null when I try to check what the value was. if (pulled.equals("preset")) { presetName = xmlParser.getAttributeValue(null,"name"); Log.d(TAG, presetName + " = " +…
Exikle
  • 1,155
  • 2
  • 18
  • 42
1
vote
0 answers

How to adjust layout of xml? android

I have this xml file
dotamon
  • 75
  • 3
  • 8
1
vote
0 answers

XmlPullParser returns null

I would like to display the values of XML "category" tags in a Spinner. I can't get XmlPullParser work, I always get XmlPullParserException. I have this XML parser class: public class XmlCategoryParser { private static final String ns =…
1
vote
1 answer

Android XmlPullParser whitespace hack. How would I do this more elegantly?

I have some XML in an Android application where XmlPullParser is the recommended solution for binding that XML to data model classes. The Android documentation for XmlPullParser is fairly good except for how to deal with inter element whitespace. …
pajato0
  • 3,628
  • 3
  • 31
  • 37
0
votes
1 answer

Attempt to invoke virtual method 'java.lang.String' on a null object reference when extracting data using from an arraylist

I am new to this platform and i've been stuck at this error for sometime i've searched for this error online but non of the answers seem to satisfy my case. I am trying to extract data using XmlPullparser on Android and adding the extracted data to…
0
votes
0 answers

Android App crashing only on specific Tablets - XmlPullParserException

I have an app published on Google Play. For two months, some crashes appear on my Google Play Console. The log is pasted below. Note that this crash so far only appeared for owners of those devices: Samsung Galaxy Tab 4 10.1 and Asus ZenPad 10, all…
BenjyTec
  • 1,719
  • 2
  • 12
  • 22
0
votes
1 answer

XmlPullParser skipping START_TAG?

So I'm trying to parse a GPX file using the XmlPullParser. For the most part, I have it working, but noticed that I'm not getting what I'm expecting. A snippet of the file:
Coyttl
  • 537
  • 1
  • 4
  • 19
0
votes
0 answers

XmlResourceParser stays at the START_DOCUMENT state after calling next()

The following code throws an exception at the 4th line XmlResourceParser parser = context.getResources().getXml(R.xml.file); parser.require(XmlPullParser.START_DOCUMENT, null, null); parser.next(); parser.require(XmlPullParser.START_TAG, null,…
Alexander Solovets
  • 2,447
  • 15
  • 22
0
votes
1 answer

XMLPullParser not finding START_TAGs

I am attempting to parse XML data from the following URL Traffic Scotland Current Incidents Right now, I have an app that, on button press, gets the XML data, attempts to parse it, and then just displays the raw xml data as I can't currently parse…
CDickson
  • 195
  • 2
  • 5
  • 15
0
votes
2 answers

Android Studio Java XmlPullParser how to get only certain tag values

I'm having trouble parsing some xml tags. I'm very new to Android development and I'm still struggling with basics. I'm sorry if this post is sort of hard to read. I want to read the following XML file that I download:
0
votes
2 answers

Parse all XML text using XMLPullParser

I have a question that is similar to [this one here][1] I have read tutorials about XMLPullParser and do not seem to get this one. I have an XML tag I want to parse using XMLPullParser
: outcome result
I want to get…
Samuel Agbede
  • 380
  • 1
  • 4
  • 14
0
votes
1 answer

XMLPullParser - Skips all tags

I need to read a XML using XMLPullParser. But when I try to parse it my eventType starts with 0 (i.e., START_DOCUMENT) and immediately skips to 1 (i.e., END_DOCUMENT) thereby skipping all the other tags. Here's my sample code: public void…
Faux Pas
  • 536
  • 1
  • 8
  • 20
0
votes
1 answer

Android : XmlSerializer or FastXmlSerializer writes & for &

In android, when writing some values containing '&' in the text part, FastXmlSerializer.attribute() or Xml.newSerializer().attribute(), method encodes '&' as '& ;'. Is there any other Xml serializer or the property that must be set to write '&'…
0
votes
1 answer

How can i identify same xml tag second time

I am not full aware of XMLParsing so i am beginner in XMLParsing. I am using XMLPull parser. i wanna to store player one and player two in below xml. How can i identify playertag??
Arpit Patel
  • 7,212
  • 5
  • 56
  • 67