The SAX parser implementation, parses the document returning information to the different handlers.
try { XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler( new TestContentHandler()); parser.parse( "test.xml"); } catch ( SAXException e) { e.printStackTrace(); }
Parses the document identified by the systemId URI.
parse( String systemId)
Parses the document identified by the InputSource object.
parse( InputSource input)
Register an application specific XML content event handler.
get/setContenHandler( ContentHandler handler)
Register an application specific error handler.
get/setErrorHandler( ErrorHandler handler)
Register an application specific entity resolver, used to resolve external entities.
get/setEntityResolver( EntityResolver resolver)
Register an application specific DTD event handler.
get/setDTDHandler( DTDHandler handler)
Enable/Disable a specific XML Reader feature.
get/setFeature( String name, boolean value)
Set the value of a specific XML Reader property.
get/setProperty( String name, String value)
Tip: Create your own XML Reader to treat other formats (CSV/Java Objects) like they were XML.