Home » Tag Archives: SAX

Tag Archives: SAX

Approaches to XML – Part 2 – What about SAX?


Part 1 introduced the idea that there are different ways to approach XML parsing and highlighted the point that XML is NOT A STRING; rather it’s an object oriented document model that can be represented using a string. Today’s blog continues this discussion using my Pete’s Perfect Pizza scenario. If you remember, Pete’s just popped his head around the door ...

Read More »

XML parsing using SaxParser with complete code


SAX parser use callback function (org.xml.sax.helpers.DefaultHandler) to informs clients of the XML document structure. You should extend DefaultHandler and override few methods to achieve xml parsing. The methods to override are startDocument() and endDocument() – Method called at the start and end of an XML document.  startElement() and endElement() – Method called at the start and end of a document ...

Read More »

JAXB, SAX, DOM Performance


This post investigates the performance of unmarshalling an XML document to Java objects using a number of different approaches. The XML document is very simple. It contains a collection of Person entities.  <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <persons> <person> <id>person0</id> <name>name0</name> </person> <person> <id>person1</id> <name>name1</name> </person> ... There is a corresponding Person Java object for the Person entity in the XML ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.