Skip to main content
Filter by
Sorted by
Tagged with
275 votes
7 answers
257k views

I read some articles about the XML parsers and came across SAX and DOM. SAX is event-based and DOM is tree model -- I don't understand the differences between these concepts. From what I have ...
user414967's user avatar
  • 5,365
44 votes
4 answers
18k views

Under the push parsing approach, a push parser generates synchronous events as a document is parsed, and these events can be processed by an application using a callback handler model This is the ...
An SO User's user avatar
  • 25.1k
31 votes
5 answers
52k views

I'm using logback with groovy and get lots of warnings showing up when parsing xml. I am aware of the bug in JDK1.7_u45 that is causing this. Warning: org.apache.xerces.parsers.SAXParser: Property '...
msoori's user avatar
  • 351
22 votes
7 answers
18k views

I understand the difference between how the SAX parser works vs the XMLPull parser. In fact there's a pretty good explanation here: http://www.firstobject.com/xml-reader-sax-vs-xml-pull-parser.htm ...
Nelson Ramirez's user avatar
18 votes
3 answers
39k views

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); ...
carsey88's user avatar
  • 387
17 votes
3 answers
15k views

I want to know what's the difference between XML SAX parser, Pull parser & DOM parser in Android. In which condition, which one is better in performance and implementation? Thanx. Khobaib.
Khobaib's user avatar
  • 1,607
17 votes
3 answers
7k views

I have a simple requirement where in I need to fetch the value of attribute xml:id i.e af1. I am making use of a SAXParser and here is my xpath:a/aff/@xml:id on the contrary I was able to fetch value ...
KRISHNA JAYANTH's user avatar
16 votes
3 answers
22k views

I get on my local machine the following exception when running the tests by maven (mvn test). ch.qos.logback.core.joran.event.SaxEventRecorder@195ed659 - Parser configuration error occured java.lang....
rit's user avatar
  • 2,318
16 votes
8 answers
12k views

I have to read a XML file with about ~4000 lines on Android. First I tried the SimpleXML library because it's the easiest and it took about 2 minutes on my HTC Desire. So I thought maybe SimpleXML is ...
Korbi's user avatar
  • 1,448
16 votes
6 answers
2k views

HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception. Following is the code try{ URL url = new URL(uri); ...
Achsah's user avatar
  • 543
13 votes
2 answers
4k views

I am searching for the main difference between SAX and Pull Parser . I know the SAX parser is good for handling the large XML file as it does not store the XML and traverse in only one direction. as ...
sharma.mahesh369's user avatar
12 votes
1 answer
66k views

I have a string which comes via an xml , and it is text in German. The characters that are German specific are encoded via the UTF-8 format. Before display the string I need to decode it. I have ...
user590849's user avatar
  • 11.9k
11 votes
5 answers
61k views

I've got the following error sometimes when I'm try to parse a XML file with Java (within GAE server): Parse: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 3; The element type "META" ...
danny11's user avatar
  • 483
11 votes
3 answers
13k views

I'm getting a "SAXParseException: Unexpected end of document" error when trying to parse an xml document on android. The document in question is from the google weather api, but it seems to throw ...
Dave Smylie's user avatar
  • 2,693
10 votes
1 answer
10k views

I'm trying to remove all the project1 nodes (along with their child elements) from the below sample xml document (original document is about 30 GB) using SAX parser.It would be fine to have a separate ...
Avinash Raj's user avatar
9 votes
1 answer
38k views

Is it possible to get the content of an element from a XML file in startElement function that is the override function of the SAX handler? Below is the specification. 1) XML file <employees> ...
sakura's user avatar
  • 309
8 votes
9 answers
12k views

I need to parse potentially huge XML files, so I guess this rules out DOM parsers. Is out there any good lightweight SAX parser for C++, comparable with TinyXML on footprint? The structure of XML is ...
Alex Jenter's user avatar
  • 4,452
8 votes
4 answers
23k views

I'm using Xerces to parse my XML document. The issue is that XML escaped characters like &amp;nbsp; appear in characters() method as non-escaped ones. I need to get escaped characters inside ...
Alexander Oleynikov's user avatar
8 votes
3 answers
14k views

What is the difference between below two snippet, if i just have to parse the XML? 1.By using SAXParser parse method: SAXParserFactory sfactory = SAXParserFactory.newInstance(); SAXParser parser = ...
sakura's user avatar
  • 2,277
8 votes
2 answers
12k views

Hello Im trying to parse an plist file that contains array of dict's. Im trying to do this using xmlwise. The content of the plistfile is here So far I only have this in my activity and im getting ...
Darko Petkovski's user avatar
7 votes
5 answers
19k views

Is it possible to give path expressions in SAX parser? I have an XML file which has a few same name tags, but they are in different element. Is there any way to differentiate between them. Here is the ...
Srinivas's user avatar
  • 349
7 votes
2 answers
20k views

I have below java code , I need to convert these in C#, Kindly help me .. public class Configuration { private ConfigContentHandler confHandler; public Configuration() { } public boolean ...
user437890's user avatar
7 votes
3 answers
21k views

I'm copying code from one part of our application (an applet) to inside the app. I'm parsing XML as a String. It's been awhile since I parsed XML, but from the error that's thrown it looks like it ...
user26270's user avatar
  • 7,094
7 votes
7 answers
8k views

I am currently developing an app that retrieves data from the internet using SAX. I used it before for parsing simple XML files like Google Weather API. However, the websites that I am interested in ...
Amine's user avatar
  • 195
7 votes
3 answers
29k views

I created a Java application which opens an xml file that looks something like this: <AnimalTree> <animal> <mammal>canine</mammal> <color>blue</color> &...
jeremy's user avatar
  • 145
7 votes
3 answers
3k views

I am reading a xml file from the SD card. Here I want to change the values of the XML file and I want to save the file to the sd card.. My code is like below.... Please guide me how to save XML file ...
MUKTHA's user avatar
  • 165
7 votes
3 answers
7k views

I'm Using a Sax parser to handle a pre-written XML file....i have no way of changing the XML as it is held by another application but need to parse data from it. The XML file contains a Tag < ...
Podge's user avatar
  • 236
6 votes
4 answers
6k views

I am developing an application in which the first time I am going to parse data from an xml file coming from a remote server. But i am not able to select which parser is efficient or best suited for ...
Manoj Fegde's user avatar
  • 4,771
6 votes
2 answers
17k views

Here is my code: path = wsdlPath; SAXParserFactory saxfac = SAXParserFactory.newInstance(); saxfac.setNamespaceAware(true); saxfac.setXIncludeAware(true); saxfac.setValidating(false); SAXParser ...
DeepNightTwo's user avatar
  • 5,001
6 votes
2 answers
19k views

I have an android app, in which user can enter any xml source url to parse. My app then parses the xml(if valid) and displays results. The issue is, if the user enters an untrusted xml source url, ...
dcanh121's user avatar
  • 4,690
6 votes
1 answer
755 views

My xml file structure is like this <?xml version="1.0" encoding="utf-8" ?> <book> <chapters> <chapter id="1"> <page id="1" cid= "1" bid = "Book1"&...
Krish's user avatar
  • 63
6 votes
2 answers
6k views

I use SAX XML Parser and when I use: public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException I can get attributes. But I need get ...
drozdzynski's user avatar
  • 1,259
5 votes
2 answers
13k views

I have XML as a string and an XSD as a file, and I need to validate the XML with the XSD. How can I do this?
volcano's user avatar
  • 91
5 votes
1 answer
6k views

I'm making an Android application that reads an XML Internet. This application uses SAX to parse XML. This is my code for the part of parsing: public LectorSAX(String url){ try{ ...
Lobo's user avatar
  • 4,157
5 votes
2 answers
5k views

This may be beyond the capabilities of the Java VM due to the size of the files being dealt with (50-100MB xml files) Right now I have a set of xml files sent as zips, which are in turn all ...
FaultyJuggler's user avatar
5 votes
3 answers
7k views

could you, please, point me to some working xml -> json translation library for node.js? A SAX-styled would be preferable to get things done while the xml file is still receiving. Thanks
kalise's user avatar
  • 239
5 votes
2 answers
2k views

I am doing some simple SAXParsing with SAXParser etc on android/java It can parse files properly, but hiccups when it encounters some special characters, for example if it parses this xml below: <...
Ahmad Mushtaq's user avatar
5 votes
2 answers
2k views

I am trying to read a file format that is based on xml and is called mzXML using SAX in JAVA. It carries partially encoded mass spectrometric data (signals with intensities). This is what the entry ...
MichaG's user avatar
  • 507
5 votes
2 answers
25k views

I am encountering the above error in production environment whereas the process went fine in UAT. I was wondering whether this error is related to jar file loading. We are using webmethods and the ...
abhijith501's user avatar
5 votes
1 answer
3k views

Is there any reason why I should use a XMLReader with the SAXParser? I'm seeing this kind of usage quite a lot: sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); ...
user avatar
5 votes
1 answer
2k views

I've done a simple test of the xml.sax parser in Jython on a large XML file (800 MB) and encountered the following error: Traceback (most recent call last): File "src/project/xmltools.py", line 92, ...
clstaudt's user avatar
  • 22.7k
5 votes
1 answer
4k views

I can parse xml just fine with SAXParserFactory in Java, BUT in some files, there are some non-lowercase attributes present, like linear3D="0.5" etc. I would like to somehow make attributes.getValue(...
Per Alexandersson's user avatar
5 votes
2 answers
267 views

Scenario: I'm receiving a huge xml file via extreme slow network so I want so start the excessive processing as early as possible. Because of that I decided to use SAXParser. I expected that after a ...
Marcel's user avatar
  • 4,442
5 votes
1 answer
4k views

Question on the Sax XML parser on Android, using Java: I need to parse XML files I get from the web, and that I have no control over. Some contain errors and cause the parser to abort with errors like ...
user avatar
5 votes
1 answer
3k views

I need to parse a bunch of incoming XML documents but it does not contain DTD declaration. Currently I am parsing xml documents using SAX Parser but without DTD validation. Now I want to apply DTD ...
Khushbu Shah's user avatar
  • 1,693
4 votes
2 answers
5k views

I am Using following two methods for parsing my Xml Data: private static XMLReader prepareSAX() throws ParserConfigurationException, SAXException { SAXParserFactory spf = SAXParserFactory....
Kishan Dhamat's user avatar
4 votes
2 answers
24k views

I am using Piccolo jar and creating XML reader using XMLReaderFactory. I need to set the secure processing feature and hence i did this way, xmlReader = XMLReaderFactory.createXMLReader("com.bluecast....
Srikanth Sridhar's user avatar
4 votes
2 answers
13k views

i'm trying to get body content of html page. suppose this html file: <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www....
mehdok's user avatar
  • 1,618
4 votes
2 answers
3k views

The task is to parse a simple XML document, and analyze the contents by line number. The right Python package seems to be xml.sax. But how do I use it? After some digging in the documentation, I ...
Steve White's user avatar
4 votes
3 answers
562 views

I have an XML file that I am trying to parse with Sax (this is my first time doing this). I've researched how to implement the parser, and that all makes sense, but I'm unsure of the best way to ...
Steve's user avatar
  • 4,741

1
2 3 4 5
19