Package com.sun.msv.writer
Class ContentHandlerAdaptor
java.lang.Object
com.sun.msv.writer.ContentHandlerAdaptor
- All Implemented Interfaces:
DocumentHandler
Adapt SAX2 ContentHandler as a SAX1 DocumentHandler.
This class wraps a ContentHandler and makes it act as a DocumentHandler.
- Author:
- David Megginson, [email protected]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) Adapt a SAX1 characters event.void
Adapt a SAX1 end document event.void
endElement
(String qName) Adapt a SAX1 end element event.void
ignorableWhitespace
(char[] ch, int start, int length) Adapt a SAX1 ignorable whitespace event.void
processingInstruction
(String target, String data) Adapt a SAX1 processing instruction event.void
setDocumentLocator
(Locator locator) Adapt a SAX1 document locator event.void
Adapt a SAX1 start document event.void
startElement
(String qName, AttributeList qAtts) Adapt a SAX1 startElement event.
-
Constructor Details
-
ContentHandlerAdaptor
-
-
Method Details
-
setDocumentLocator
Adapt a SAX1 document locator event.- Specified by:
setDocumentLocator
in interfaceDocumentHandler
- Parameters:
locator
- A document locator.- See Also:
-
startDocument
Adapt a SAX1 start document event.- Specified by:
startDocument
in interfaceDocumentHandler
- Throws:
SAXException
- The client may raise a processing exception.- See Also:
-
endDocument
Adapt a SAX1 end document event.- Specified by:
endDocument
in interfaceDocumentHandler
- Throws:
SAXException
- The client may raise a processing exception.- See Also:
-
startElement
Adapt a SAX1 startElement event.If necessary, perform Namespace processing.
- Specified by:
startElement
in interfaceDocumentHandler
- Parameters:
qName
- The qualified (prefixed) name.qAtts
- The XML 1.0 attribute list (with qnames).- Throws:
SAXException
-
endElement
Adapt a SAX1 end element event.- Specified by:
endElement
in interfaceDocumentHandler
- Parameters:
qName
- The qualified (prefixed) name.- Throws:
SAXException
- The client may raise a processing exception.- See Also:
-
characters
Adapt a SAX1 characters event.- Specified by:
characters
in interfaceDocumentHandler
- Parameters:
ch
- An array of characters.start
- The starting position in the array.length
- The number of characters to use.- Throws:
SAXException
- The client may raise a processing exception.- See Also:
-
ignorableWhitespace
Adapt a SAX1 ignorable whitespace event.- Specified by:
ignorableWhitespace
in interfaceDocumentHandler
- Parameters:
ch
- An array of characters.start
- The starting position in the array.length
- The number of characters to use.- Throws:
SAXException
- The client may raise a processing exception.- See Also:
-
processingInstruction
Adapt a SAX1 processing instruction event.- Specified by:
processingInstruction
in interfaceDocumentHandler
- Parameters:
target
- The processing instruction target.data
- The remainder of the processing instruction- Throws:
SAXException
- The client may raise a processing exception.- See Also:
-