Package org.xmldb.api.sdk.modules
Class SetContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.xmldb.api.sdk.modules.SetContentHandler
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler
public class SetContentHandler extends org.xml.sax.helpers.DefaultHandlerSimple ContentHandler that just converts the SAX event stream into a text representation of the document and stores it in the associated resource.
-
-
Constructor Summary
Constructors Constructor Description SetContentHandler(XMLResource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)Receive notification of character data inside an element.voidendDocument()Receive notification of the end of the document.voidendElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)Receive notification of the end of an element.voidendPrefixMapping(java.lang.String prefix)Receive notification of the end of a Namespace mapping.voidignorableWhitespace(char[] ch, int start, int length)Receive notification of ignorable whitespace in element content.voidprocessingInstruction(java.lang.String target, java.lang.String data)Receive notification of a processing instruction.voidskippedEntity(java.lang.String name)Receive notification of a skipped entity.voidstartDocument()Receive notification of the beginning of the document.voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)Receive notification of the start of an element.voidstartPrefixMapping(java.lang.String prefix, java.lang.String uri)Receive notification of the start of a Namespace mapping.
-
-
-
Constructor Detail
-
SetContentHandler
public SetContentHandler(XMLResource resource)
-
-
Method Detail
-
startDocument
public void startDocument() throws org.xml.sax.SAXExceptionReceive notification of the beginning of the document.- Specified by:
startDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
startDocumentin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.startDocument()
-
endDocument
public void endDocument() throws org.xml.sax.SAXExceptionReceive notification of the end of the document.- Specified by:
endDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
endDocumentin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.endDocument()
-
startPrefixMapping
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXExceptionReceive notification of the start of a Namespace mapping.- Specified by:
startPrefixMappingin interfaceorg.xml.sax.ContentHandler- Overrides:
startPrefixMappingin classorg.xml.sax.helpers.DefaultHandler- Parameters:
prefix- The Namespace prefix being declared.uri- The Namespace URI mapped to the prefix.- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)
-
endPrefixMapping
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXExceptionReceive notification of the end of a Namespace mapping.- Specified by:
endPrefixMappingin interfaceorg.xml.sax.ContentHandler- Overrides:
endPrefixMappingin classorg.xml.sax.helpers.DefaultHandler- Parameters:
prefix- The Namespace prefix being declared.- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.endPrefixMapping(java.lang.String)
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXExceptionReceive notification of the start of an element.- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler- Overrides:
startElementin classorg.xml.sax.helpers.DefaultHandler- Parameters:
attributes- The specified or defaulted attributes.uri- Description of ParameterlocalName- Description of ParameterqName- Description of Parameter- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXExceptionReceive notification of the end of an element.- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler- Overrides:
endElementin classorg.xml.sax.helpers.DefaultHandler- Parameters:
uri- Description of ParameterlocalName- Description of ParameterqName- Description of Parameter- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXExceptionReceive notification of character data inside an element.- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler- Overrides:
charactersin classorg.xml.sax.helpers.DefaultHandler- Parameters:
ch- The characters.start- The start position in the character array.length- The number of characters to use from the character array.- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.characters(char[], int, int)
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXExceptionReceive notification of ignorable whitespace in element content.- Specified by:
ignorableWhitespacein interfaceorg.xml.sax.ContentHandler- Overrides:
ignorableWhitespacein classorg.xml.sax.helpers.DefaultHandler- Parameters:
ch- The whitespace characters.start- The start position in the character array.length- The number of characters to use from the character array.- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.ignorableWhitespace(char[], int, int)
-
processingInstruction
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXExceptionReceive notification of a processing instruction.- Specified by:
processingInstructionin interfaceorg.xml.sax.ContentHandler- Overrides:
processingInstructionin classorg.xml.sax.helpers.DefaultHandler- Parameters:
target- The processing instruction target.data- The processing instruction data, or null if none is supplied.- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.processingInstruction(java.lang.String, java.lang.String)
-
skippedEntity
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXExceptionReceive notification of a skipped entity.- Specified by:
skippedEntityin interfaceorg.xml.sax.ContentHandler- Overrides:
skippedEntityin classorg.xml.sax.helpers.DefaultHandler- Parameters:
name- The name of the skipped entity.- Throws:
org.xml.sax.SAXException- Description of Exception- See Also:
ContentHandler.processingInstruction(java.lang.String, java.lang.String)
-
-