Class: OScript SAXParser - no its not what you think

Class: OScript SAXParser - no its not what you think

SAX in the Content Server?

SAX stands for Simple API for XML and its not a typo :-). You can parse XML docs directly from oScript, for example XML Logs or HTML files.

SAX is a callback implementation. As it iterates over each fundamental unit of XML, is that as it reads each unit of XML, it creates an event that the host program can use.

SAX Parser in java provides API to parse XML documents. SAX parser is different from DOM parser because it doesn't load complete XML into memory and read xml document sequentially.

The SAXParser Package provides an interface to the XML SAX parser. The SAX parser provides the ability to use a lightweight XML parser. One set of methods configures the various options for parsing. Another set of methods is used to set up the callbacks that are necessary for the SAX parser to report its results. Two callbacks, StartDocument and EndDocument, signals of the start and end of parsing a document. Another set of callbacks, StartElement and EndElement tell when the start and end of a tag is found. Last the callback, Characters, reports the data value for a tag.

How to instantiate?

New( )

Create a new SAXParser instance.

What are the Methods?

Attributes



要查看或添加评论,请登录