Questions tagged [sax]

SAX stands for Simple API for XML, and is an event-based way of reading XML data from a document.

SAX (Simple API for XML) is an event-based sequential access parser API developed by the XML-DEV mailing list for XML documents.
SAX provides a mechanism for reading data from an XML document that is an alternative to that provided by the Document Object Model (DOM). Where the DOM operates on the document as a whole, SAX parsers operate on each piece of the XML document sequentially.

XML processing with SAX

A parser that implements SAX (i.e., a SAX Parser) functions as a stream parser, with an event-driven API. The user defines a number of callback methods that will be called when events occur during parsing. The SAX events include (among others):

Useful references:

1784 questions
0
votes
3 answers

Why are my \n not working in PHP?

I'm playing with SAX and noticed it's not line breaking properly. I have no iea why. function flush_data() { global $level, $char_data; $char_data = trim($char_data); if( strlen( $char_data ) > 0 ) { print "\n"; …
Strawberry
  • 66,024
  • 56
  • 149
  • 197
0
votes
1 answer

Can only parse TITLE tag -- LINK, DESCRIPTION, PUBDATE and others will not parse. (RSS / SAX)

I'm new to android development and I have been struggling to parse more than one tag at a time and display it in a ListView. I'm using SAX parser, here is my RssParseHandler code. public class RssParseHandler extends DefaultHandler { private…
exhibitO
  • 1
  • 2
0
votes
1 answer

XML Serialization with SAX parser

I am looking at Xerces for XML processing for my project. What I need is to serialize the XML using that library. Looking at the documentation and on the web I see that the library have DOM Serializer. Now I have to use SAX parser to work with…
Igor
  • 5,620
  • 11
  • 51
  • 103
0
votes
1 answer

Using xpath in Gatling 1.5.6 to extract data from an HTML file containing entities

I am using Gatling 1.5.6, and part of the load test requires me to extract an ID from some HTML returned from the server. However, the HTML includes à, and Xerces' DOMParser gets tripped up on this with the following error…
Rich
  • 15,602
  • 15
  • 79
  • 126
0
votes
2 answers

running Sax parser

Am new to using SAX parser .Can anyone tell me how to run it .and what all are required to run it (jdk )..Can i have a sax parser that can parse both android xml and a normal xml
apoorva
  • 195
  • 1
  • 2
  • 13
0
votes
1 answer

Expat unable to parse when '<' or '>' found in text section

Let's say I have something like this some 'text', expat has no problem parsing this. Now if I have this: '' it freaks out about a mismatched tag, which is due to < being found. Unfortunately I can't just escape…
Chrispresso
  • 3,660
  • 2
  • 19
  • 31
0
votes
2 answers

Using xsl:result-document in Java (Sax)

I really read and tested a lot, but I don't get a working java-solution: I have a large xml-file (more than 100MB) which is processed via JAXB by now. The aim is to split the xml into many xmls using one child of root every time. Important: Because…
Sammy
  • 1,178
  • 1
  • 14
  • 27
0
votes
1 answer

Android Sax Parser HttpClient vs Url what are the differences

Hi everyone I'm quite new in Android developement, I want to know if there's any difference between passing the stream to the parser in this way SAXParserFactory saxPF = SAXParserFactory.newInstance(); SAXParser saxP = saxPF.newSAXParser(); …
Matteo Corti
  • 484
  • 2
  • 13
0
votes
1 answer

Generating XML Data from Java Code to store in column of XMLTYPE

I have to store XML Data via Java code into Oracle XMLTYPE column. I want the data to be generated dynamically rather than providing a hard coded String . Performance is also one of the concern,need to generate large XML files. What would be an…
Abhishek
  • 878
  • 12
  • 28
0
votes
0 answers

Using SAX parser for a large xml file without a handler

So I'm currently in the middle of developing a program that parses through any XML file and returns data from it in the exact order it's in. The problem I have however is that the program must be able to handle different XML files (i.e. having…
user2062207
  • 955
  • 4
  • 18
  • 34
0
votes
1 answer

How to Monitor each parallel running AsyncTask

I am running three AsyncTask parallel. (at least I think they are being executed parallel). What I am doing is, I am using SAX Parser to parse data from three different XML feeds, the AsyncTask object is created three times inside a loop, each time…
Riley Willow
  • 594
  • 2
  • 5
  • 21
0
votes
1 answer

Build error at sax.js

I am building an App in cordova from commandline. But I have the following error. Can someone help me to resolve. I searced all over but, I couldnt find. My Environment Variables %ANT_HOME% : C:\apache-ant-1.9.3-bin\apache-ant-1.9.3 %JAVA_HOME%…
user3616287
0
votes
1 answer

Parsing an XML using XPath / DOM / SAX

I have an xml that I need to Parse and fetch values from it. However , I am not sure which way of parsing would be the best for the xml of this type. I read about different ways but not sure if that's the best possible way. Could someone please help…
Bhavin Bhatia
  • 43
  • 2
  • 9
0
votes
2 answers

PHP Sax: Why might I use this for?

What is this for and why might I use it?
Strawberry
  • 66,024
  • 56
  • 149
  • 197
0
votes
2 answers

Limit XML SAXParser to certain number or item

I am parsing an rss XML news feed for an Android app. I am using SAXParser and all is working as it should but I would like to be able to limit the number of stories that I am retrieving and I cannot find a way to do so. For instance, say there…
WeVie
  • 568
  • 2
  • 9
  • 25