Questions tagged [xmlpullparser]

Either the Android XMLPullParser, or any other XML parser implementation that uses the concept of pulling in XML events.

Either the Android XMLPullParser, or any other XML parser implementation that uses the concept of pulling in XML events.

428 questions
3
votes
1 answer

Android Gradle Plugin 3.0.0: Multiple dex files define Lorg/xmlpull/mxp1/MXParser with XStream

Included projects that bring their own xmlpullparser always needed some extra care in Android Studio since Android brings its own xmlpullparser. E.g. the popular XML mapper XStream required this exclude (1) (2)…
OneWorld
  • 17,512
  • 21
  • 86
  • 136
3
votes
0 answers

Android XMLPullParser multiple passes through XML document

I'm trying to use XMLPullParser to parse a large XML document for an Android application. Often I need to re-traverse the document from the beginning. How would I reset the parser? It seems inefficient to call getResources.getXML() repeatedly. …
Roy Battie
  • 31
  • 1
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
3
votes
4 answers

Difficulty with XML nested tags with XMLPullParser in Android

I'm trying to get the name and reading type="alpha". I'm a beginner and English is not my first language, please pardon me. I've read about DOM, SAX, Simple, other StackOverflow posts, other samples but I don't understand and will like to learn…
TryingToLearn
  • 33
  • 1
  • 6
3
votes
1 answer

Why is XmlPullParser delivering two START_DOCUMENT events?

In an Android app I have an XmlPullParser: XmlResourceParser xrp = c.getResources().getXml(rid); ... (as you can see it's from an Android binary XML resource) ... and the first two events that it delivers are both START_DOCUMENT. Why? Is that…
nmr
  • 16,625
  • 10
  • 53
  • 67
3
votes
2 answers

How to get child or sub Tags in xml using XMLPullParsing in android

I am using XmlPullParser in android for parsing an XML file. Its running fine when there are no sub tags inside my xml, I just check for the starting tag using XmlPullParse.START_TAG and get the appropriate attributes value, But I get stuck in a…
Salman Khan
  • 2,822
  • 5
  • 32
  • 53
3
votes
0 answers

android, enable xml validation in xml pull parser

I'm using simplexml framework on Android and it parse xml internally with xmlpullparser. There is any capabilities to enable xml validation to prevent XXE attacks or any settings for this? Thanks!
aim
  • 1,461
  • 1
  • 13
  • 26
3
votes
3 answers

XmlPullParser get file from filesystem

I my app creater xml file in Android file system. I ned parse this file with XmlPullParser, but I get error wile compilation: "variable parser might not have been initialized". My code: InputStream inputStream =…
Coma White
  • 347
  • 1
  • 5
  • 16
3
votes
1 answer

Load and Query large xml file Android

I’m building an android app and I have a xml file which is my data source, I load it to make queries using XPath and then load the results in a ListView. The problem comes out when the xml file start to become bigger(up to 10MB). It means that i…
AXSM
  • 1,142
  • 1
  • 12
  • 27
3
votes
0 answers

Store the position of XmlPullParser

I'm using the XmlPullParser for parsing a xml file in Android. However i want to pause the parser whenever i want. I use Filechannels, which i create from a RandomAccessFile. Then I create an Inputstream using the method…
João Nunes
  • 711
  • 4
  • 11
  • 22
3
votes
1 answer

XmlPullParserException parsing attribute that contains entity

I'm using kXML2 on a legacy JavaME project. I'm receiving an XML where some attributes contain encoded entites. When I retrieve that attribute value with the call: parser.getAttributeValue It throws an Exception: XmlPullParserException:…
Mister Smith
  • 27,417
  • 21
  • 110
  • 193
2
votes
3 answers

missing characters with xmlpullparser

I'm parsing some file with XmlPullParser in Android Everything goes fine except for some especial HTML characters on the text like this: í it should be í é it should be é but they are missing on the Strings I extract: camión it…
butelo
  • 1,653
  • 1
  • 18
  • 29
2
votes
1 answer

Interpreting pull parser error message

I am seeing the following error message in my tomcat logs. I'm not sure what it means. Can someone help with interpretation: org.xmlpull.v1.XmlPullParserException: entity reference names can not start with character ' ' (position: START_TAG seen…
Elliott
  • 5,523
  • 10
  • 48
  • 87
2
votes
1 answer

calling magento web service from android client using kSoap2

i am trying to access a magento web service from a android client.which should return a session id.i hav already done this uing java client using apache and am successful in calling the method. How ever i am getting xmlpullparser exception when…
maddy
  • 4,001
  • 8
  • 42
  • 65
2
votes
2 answers

What pull parser implementation to use and when?

I need to use a xml pull parser. I can find stax-api.jar which seems to be already part of com.sun.xml.* and it seems that there is already something stax related implemented. com.sun.xml unfortunately has no sources in JDK 6, so I can't tell.…
lisak
  • 21,611
  • 40
  • 152
  • 243