Questions tagged [saxparser]

SAX (Simple API for XML) is an event-based parser for XML documents.

SAX is an alternative model to DOM for processing XML documents. Where DOM works on the document as a whole, SAX works piece by piece.

935 questions
3
votes
1 answer

SAX parser doesn't follow references

I am trying to parse an HL7 message definition from xsd. I have my schema definition split up between two files. First file contains actual message definition and the second contains segment definitions within the message. I am trying to tweak an…
svager
  • 769
  • 5
  • 13
  • 32
3
votes
1 answer

Android OutOfMemoryError

My application is crashing when trying to parse a large XML file using SAXParser. I found a question in SO regarding it here unanswered. It is working as intended when i reduce the size of the XML Here is my LogCat output. 11-26 12:08:45.099:…
Ajith
  • 1,457
  • 3
  • 16
  • 29
3
votes
0 answers

different ouputs using maven jar vs maven classes

I am working on a Project for my university in a group of 7 people. We have a Problem, that we have different outputs depending on what we use to compile one of our Components. If we use the .class files, which are also created by maven everything…
Julius K.
  • 33
  • 6
3
votes
2 answers

How to use the event driven SAX(Simple API FOR XML) parser in C# or is it better to use System.XML namespace?

In C++ we can import msxml DLL to our application and then implement the methods of the interface ISAXContentHandler in a class of our application. Later create an ISAXReader object and invoke the contentHandler with the instance of this class where…
codeLover
  • 3,720
  • 10
  • 65
  • 121
3
votes
2 answers

Get parent element on XSD validation error

I have the following xml with unit & measure child elements. 1.00 in 1.00 in 1.00
pup784
  • 533
  • 3
  • 5
  • 15
3
votes
2 answers
3
votes
3 answers

Parsing big XML file with SAX parser, the class is becoming bloated and unreadable - How to fix this?

This is purely a code readability related question, the performance of the class is not an issue. Here is how I am building this XMLHandler : For each element that is relevant to the application, I have a boolean in'ElementName' which I set to true…
SAKIROGLU Koray
  • 208
  • 1
  • 9
3
votes
1 answer

Android XmlSax Parsor Error in Xml file

Error:org.xml.sax.SAXParseException; lineNumber: 0; columnNumber: 0; cvc-pattern-valid: Value 'build-tools;23.0.0 rc2' is not facet-valid with respect to pattern '[a-zA-Z0-9_-;.]+' for type 'segmentListType'. This error i am getting when i compile…
Jitender
  • 123
  • 1
  • 12
3
votes
4 answers

Gradle build error: SAXParseException

on building the app, i get following error: Error:org.xml.sax.SAXParseException; lineNumber: 0; columnNumber: 0; cvc-pattern-valid: Value 'build-tools;23.0.0 rc3' is not facet-valid with respect to pattern '[a-zA-Z0-9_\-;.]+' for type…
3
votes
1 answer

SAX parser reading portion of XML element when there is unusually big value somewhere in the document

I have using SAX parser to read a few elements from a large XML file. Below are the sample XML and the SAX parser code i am using for this…
ishan
  • 1,202
  • 5
  • 24
  • 44
3
votes
5 answers

é is not correctly parsed

My application will read xml from urlconnection. The xml encoding is ISO-8859-1, it contains é character. I use xerces saxparser to parse received xml content. However, é can not be parsed correctly while running application under lunix OS.…
Dell
3
votes
1 answer

Namespace handling with SAX in Java

Consider the following input xml document: ...and the following handler: final class XMLizatorSaxHandler extends DefaultHandler { @Override public void startElement(String uri, String…
lviggiani
  • 5,824
  • 12
  • 56
  • 89
3
votes
1 answer

What is the right way to get attribute value in libXML sax parser (C++)?

I am using the SAX interface of libXML to write a XML parser application in C++. how do I parse this attribute? I tried using void startElementNsSAX2Func(void * ctx, const xmlChar *localname, const xmlChar…
gunner4evr
  • 79
  • 7
3
votes
1 answer

Way to capture part XML code in SAXParser

I need to capture text within tags of my XML file. Whole text, with other tags, their attributes etc. I could do this using, for example, regular expressions, but I need this to be safe, so I would like to use SAXParser. But I'm afraid that…
Krzysztof Stanisławek
  • 1,267
  • 4
  • 13
  • 27
3
votes
1 answer

Parsing issue nested tag with same tag name

I need to parse xml with similar structure, 1 1 question sample…
Jenefer
  • 113
  • 8