javolution37.javolution.xml.sax
Class DefaultHandler
- java.lang.Object
-
- javolution37.javolution.xml.sax.DefaultHandler
-
- All Implemented Interfaces:
- ContentHandler, org.xml.sax.ErrorHandler
public class DefaultHandler extends java.lang.Object implements ContentHandler, org.xml.sax.ErrorHandler
Default base class for real-time handling of XML events.
-
-
Constructor Summary
Constructors Constructor and Description DefaultHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcharacters(char[] ch, int start, int length)Receives notification of character data.voidendDocument()Receives notification of the end of a document.voidendElement(java.lang.CharSequence namespaceURI, java.lang.CharSequence localName, java.lang.CharSequence qName)Receives notification of the end of an element.voidendPrefixMapping(java.lang.CharSequence prefix)Ends the scope of a prefix-URI mapping.voiderror(org.xml.sax.SAXParseException e)Receives notification of recoverable parser error.voidfatalError(org.xml.sax.SAXParseException e)Reports a fatal XML parsing error.voidignorableWhitespace(char[] ch, int start, int length)Receives notification of ignorable whitespace in element content.voidprocessingInstruction(java.lang.CharSequence target, java.lang.CharSequence data)Receives notification of a processing instruction.voidsetDocumentLocator(org.xml.sax.Locator locator)Receives an object for locating the origin of SAX document events.voidskippedEntity(java.lang.CharSequence name)Receives notification of a skipped entity.voidstartDocument()Receives notification of the beginning of a document.voidstartElement(java.lang.CharSequence namespaceURI, java.lang.CharSequence localName, java.lang.CharSequence qName, Attributes atts)Receives notification of the beginning of an element.voidstartPrefixMapping(java.lang.CharSequence prefix, java.lang.CharSequence uri)Begins the scope of a prefix-URI Namespace mapping.voidwarning(org.xml.sax.SAXParseException e)Receives notification of a warning.
-
-
-
Method Detail
-
warning
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXExceptionReceives notification of a warning. The default behaviour is to take no action.- Specified by:
warningin interfaceorg.xml.sax.ErrorHandler- Parameters:
e- the warning information encapsulated in a SAX parse exception.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
error
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXExceptionReceives notification of recoverable parser error. The default behaviour is to take no action.- Specified by:
errorin interfaceorg.xml.sax.ErrorHandler- Parameters:
e- the error information encapsulated in a SAX parse exception.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
fatalError
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXExceptionReports a fatal XML parsing error. The default behaviour is to throw the specified exception.- Specified by:
fatalErrorin interfaceorg.xml.sax.ErrorHandler- Parameters:
e- the error information encapsulated in a SAX parse exception.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
Description copied from interface:ContentHandlerReceives an object for locating the origin of SAX document events.- Specified by:
setDocumentLocatorin interfaceContentHandler- Parameters:
locator- the document locator.
-
startDocument
public void startDocument() throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerReceives notification of the beginning of a document.- Specified by:
startDocumentin interfaceContentHandler- Throws:
org.xml.sax.SAXException- any SAX exception.
-
endDocument
public void endDocument() throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerReceives notification of the end of a document.- Specified by:
endDocumentin interfaceContentHandler- Throws:
org.xml.sax.SAXException- any SAX exception.
-
startPrefixMapping
public void startPrefixMapping(java.lang.CharSequence prefix, java.lang.CharSequence uri) throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerBegins the scope of a prefix-URI Namespace mapping.- Specified by:
startPrefixMappingin interfaceContentHandler- Parameters:
prefix- the Namespace prefix being declared.uri- the namespace URI the prefix is mapped to.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
endPrefixMapping
public void endPrefixMapping(java.lang.CharSequence prefix) throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerEnds the scope of a prefix-URI mapping.- Specified by:
endPrefixMappingin interfaceContentHandler- Parameters:
prefix- the prefix that was being mapping.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
startElement
public void startElement(java.lang.CharSequence namespaceURI, java.lang.CharSequence localName, java.lang.CharSequence qName, Attributes atts) throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerReceives notification of the beginning of an element.- Specified by:
startElementin interfaceContentHandler- Parameters:
namespaceURI- the namespace URI, or an empty character sequence if the element has no Namespace URI or if namespace processing is not being performed.localName- the local name (without prefix), or an empty character sequence if namespace processing is not being performed.qName- the qualified name (with prefix), or an empty character sequence if qualified names are not available.atts- the attributes attached to the element. If there are no attributes, it shall be an emptyAttributesobject.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
endElement
public void endElement(java.lang.CharSequence namespaceURI, java.lang.CharSequence localName, java.lang.CharSequence qName) throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerReceives notification of the end of an element.- Specified by:
endElementin interfaceContentHandler- Parameters:
namespaceURI- the namespace URI, or an empty character sequence if the element has no Namespace URI or if namespace processing is not being performed.localName- the local name (without prefix), or an empty character sequence if namespace processing is not being performed.qName- the qualified XML 1.0 name (with prefix), or an empty character sequence if qualified names are not available.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerReceives notification of character data.- Specified by:
charactersin interfaceContentHandler- Parameters:
ch- the characters from the XML document.start- the start position in the array.length- the number of characters to read from the array.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerReceives notification of ignorable whitespace in element content.- Specified by:
ignorableWhitespacein interfaceContentHandler- Parameters:
ch- the characters from the XML document.start- the start position in the array.length- the number of characters to read from the array.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
processingInstruction
public void processingInstruction(java.lang.CharSequence target, java.lang.CharSequence data) throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerReceives notification of a processing instruction.- Specified by:
processingInstructionin interfaceContentHandler- Parameters:
target- the processing instruction target.data- the processing instruction data, or null if none was supplied. The data does not include any whitespace separating it from the target.- Throws:
org.xml.sax.SAXException- any SAX exception.
-
skippedEntity
public void skippedEntity(java.lang.CharSequence name) throws org.xml.sax.SAXExceptionDescription copied from interface:ContentHandlerReceives notification of a skipped entity.- Specified by:
skippedEntityin interfaceContentHandler- Parameters:
name- the name of the skipped entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be the character sequence "[dtd]".- Throws:
org.xml.sax.SAXException- any SAX exception.
-
-
DMelt 3.0 © DataMelt by jWork.ORG