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
21
votes
7 answers

XmlPullParserException Binary XML file line #17 tag requires viewportWidth > 0

This is a follow up question to this question: Update Android Support Library to 23.2.0 cause error: XmlPullParserException Binary XML file line #17 tag requires viewportWidth > 0 I also updated the support library to 23.2 and started…
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
18
votes
2 answers

How I get Attribute using by XMLPull parser

I have an xml file and I show the small part of it, to show the content what I want
DEVANG SHARMA
  • 2,662
  • 5
  • 33
  • 52
9
votes
2 answers

Easiest way to write and read an XML

I'd like to know what is the easiest way to write to and parse a XML file in Android. My requirement is very simple. A sample file would be something like: And I only want to retrieve an item by the ID and read…
madu
  • 5,232
  • 14
  • 56
  • 96
9
votes
7 answers

XmlPullParser - Parse nested tag

I have this XML: Plain Bagel
iqueqiorio
  • 1,149
  • 2
  • 35
  • 78
8
votes
1 answer

How to parse XML return from OkHttp?

This is my OkHttp Post Form Parameter Method using OkHttp's Async Get public Call postGetCountries(Callback callback) { RequestBody body = new FormEncodingBuilder() .add("op", "op") .build(); Log.d(TAG_PARAMS,…
Hiroga Katageri
  • 1,345
  • 3
  • 21
  • 40
5
votes
1 answer

How can I parse XML android?

I am having trouble in parsing my XML, I have tried many things. I have xml like this.
4
votes
1 answer

Android LayoutInflater: inflate Binary layout xml

I am trying to dynamically inflate an layout xml file. The file should later come from a server so the Android app (client) will download it and load the layout. I know that its impossible to do this with a plain layout file because for performance…
3
votes
1 answer

XmlResourceParser.getText() drops text after single quote char, ignores double quotes

Currently trying to implement an Android version of my iOS application and running into some issues parsing XML where the text contains a single quote or double quote character (it's a dictionary app for a foreign language). All of my app's data is…
ngoue
  • 1,045
  • 1
  • 12
  • 25
3
votes
2 answers

Modify xml attributes values using XmlPullParser

I have an XML (actually a String) and I want to find all tags which contain attributes width and height and to modify their values. XML example:
Paul
  • 3,812
  • 10
  • 50
  • 73
2
votes
2 answers

Parse channel node using XmlPullParser

I'm trying to parse the channel node from an RSS feed but I keep getting this error thrown at parser.nextText(): org.xmlpull.v1.XmlPullParserException: precondition: START_TAG (position:END_TAG @3:449 in java.io.InputStreamReader@7988a7d)…
Kris B
  • 3,436
  • 9
  • 64
  • 106
2
votes
1 answer

Android - Pull Parser

I am having one xml file and I want to parse it to get Student-ids and student-names only. 101 James 1978271
Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
2
votes
0 answers

xml nodes are not being skipped using XmlPullParser

i have gone through already asked questions , but none of them is the solution for my problem. after running some programs, i guessed that we can not skip any tag in xml data processing once we start to process desired node..(in this code snippet…
2
votes
0 answers

XmlPullParser getAttributeValue returns null in API 8

I'm using XmlPullParser sample but when run in API 8 or 10 the values return null (I'm not sure), but in other version API 16 + working fine. What could be happening?. The parameter that returns null is getAttributeValue(null, "name"). UPDATE: Into…
Paul Proaño
  • 111
  • 1
  • 11
2
votes
2 answers

XMLPullParser getName() returns null

I am trying to parse openweathermap api http://api.openweathermap.org/data/2.5/weather?q=London&mode=xml. I am using KXmlParser via XmlPullParserFactory.newPullParser() but the XMLPullParser.getName() is always returning null. It might be some silly…
Rohan Kandwal
  • 9,112
  • 8
  • 74
  • 107
1
2 3 4 5 6 7 8