Home | | Service Oriented Architecture | What Is SAX, Anyway?

Chapter: XML and Web Services : Building XML-Based Applications : Parsing XML Using SAX

What Is SAX, Anyway?

SAX is an API that can be used to parse XML documents. A parser is a program that reads data a character at a time and returns manageable pieces of data.

What Is SAX, Anyway?

 

SAX is an API that can be used to parse XML documents. A parser is a program that reads data a character at a time and returns manageable pieces of data. For example, a parser for the English language might break up a document into paragraphs, words, and punctuation. In the case of XML, the important pieces of data include elements, attrib-utes, text, and so on. This is what SAX does.

 

SAX provides a framework for defining event listeners, or handlers. These handlers are written by developers interested in parsing documents with a known structure. The han-dlers are registered with the SAX framework in order to receive events. Events can include start of document, start of element, end of element, and so on. The handlers con-tain a number of methods that will be called in response to these events. Once the han-dlers are defined and registered, an input source can be specified and parsing can begin.


Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
XML and Web Services : Building XML-Based Applications : Parsing XML Using SAX : What Is SAX, Anyway? |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.