The Java Sax parsing mechanism provides us with a series of APIs to handle XML files, and Sax parsing and Dom parsing are not the same, it does not load the contents of the XML file all at once, but a continuous partial load. The Javax.xml.parsers.SAXParser class provides functions that parse an XML document using event handling, which implements the XmlReader interface and provides an overloaded parse () method from File,inputstream,sax The XML document is read in the InputSource and URI strings. The actual XML parsing work is done by the handler class, and we need to create our own handler class, which requires us to implement the Org.xml.sax.ContentHandler interface. This interface contains callback methods that receive notifications when an event occurs, such as Startdocument, Enddocument, Startelement, EndElement, Characterdata, and so on. Org.xml.s
1. Java&xml Tutorial (v) parsing XML files using SAX methods
Summary: The Java sax parsing mechanism provides us with a series of APIs to handle XML files, and Sax parsing and Dom parsing are not the same, it does not load the contents of the XML file all at once, but a continuous partial load.
2. Python application instance sharing with DOM and sax parsing xml
Introduction: This article mainly describes the python through the DOM and Sax parsing XML application Examples of sharing, for both of these analytic methods Python has relevant modules to use, the need for friends can refer to the following
3. PHP parsing XML using SAX implementation code and problem analysis
Introduction: Recently in a small program to parse XML, because the server is PHP4, XML parsing function can only be used sax Xml_parser to parse.
4. Easily parse XML documents using PHP 5.0 _php
Introduction: When using sax, it is required to build 3 functions, and to use the three function directly to return data, requires strong logic. When dealing with XML of different structure, we have to reconstruct these three functions, trouble! Dom Way, but it is better, but he sees each node as a nodes, operation to write a lot of code, trouble! There's a lot of open-source X on the Web
"Related question and answer recommendation":
How to parse Multi-level nodes under XML using the Python Sax method