capint
11/24/2015 - 12:27 PM

Java >> XML >> SAX >> ContentHandler or DefaultHandler

Java >> XML >> SAX >> ContentHandler or DefaultHandler

//*** Is a default base class for SAX2 event handler
//*** Used to specifie the callback methods

    void startDocument() - Called at the beginning of a document.

    void endDocument() - Called at the end of a document.

    void startElement(String uri, String localName, String qName, Attributes atts) - Called at the beginning of an element.

    void endElement(String uri, String localName,String qName) - Called at the end of an element.

    void characters(char[] ch, int start, int length) - Called when character data is encountered.

    void ignorableWhitespace( char[] ch, int start, int length) - Called when a DTD is present and ignorable whitespace is encountered.

    void processingInstruction(String target, String data) - Called when a processing instruction is recognized.

    void setDocumentLocator(Locator locator)) - Provides a Locator that can be used to identify positions in the document.

    void skippedEntity(String name) - Called when an unresolved entity is encountered.

    void startPrefixMapping(String prefix, String uri) - Called when a new namespace mapping is defined.

    void endPrefixMapping(String prefix) - Called when a namespace definition ends its scope.