The parser
The parser developer creates a class that parses the XML document or data stream. This parser class implements the Parser interface, which defines the following methods:
void parse(InputSource src) throws SAXException, IOException; void parse(String src) throws SAXException, IOException; void setDocumentHandler(DocumentHandler doch); void setErrorHandler(ErrorHandler errh); void setDTDHandler(DTDHandler dtdh); void setEntityResolver(EntityResolver entres); void setLocale(Locale loc) throws SAXException;
Note that in SAX 2.0, while this interface is still available, it is superseded by the XMLReader interface, which mainly adds a standard model for getting and setting parser features and properties.
These methods fall into two groups. ...
Get XML Companion, The, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.