Package org.exolab.castor.xml.util
Class SAX2ANY
java.lang.Object
org.exolab.castor.xml.util.SAX2ANY
- All Implemented Interfaces:
ContentHandler
,DocumentHandler
,ErrorHandler
This class is a SAX Content Handler that build an AnyNode from a stream of SAX events (either
SAX1 for compatibility or SAX2)
- Version:
- $Revision$ $Date: 2006-04-29 09:44:19 -0600 (Sat, 29 Apr 2006) $
- Author:
- Arnaud Blandin
-
Constructor Summary
ConstructorsConstructorDescriptionSAX2ANY()
Default constructorSAX2ANY
(NamespacesStack namespacesStack, boolean wsPreserve) Constructs a SAX2ANY given a namespace context. -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
void
endElement
(String name) void
endElement
(String namespaceURI, String localName, String qName) void
endPrefixMapping
(String prefix) void
void
void
ignorableWhitespace
(char[] ch, int start, int length) void
processingInstruction
(String target, String data) void
setDocumentLocator
(Locator locator) Sets the document locator of the current parsed inputsourcevoid
skippedEntity
(String name) void
void
startElement
(String namespaceURI, String localName, String qName, Attributes atts) void
startElement
(String name, AttributeList atts) void
startPrefixMapping
(String prefix, String uri) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
SAX2ANY
public SAX2ANY()Default constructor -
SAX2ANY
Constructs a SAX2ANY given a namespace context.- Parameters:
namespacesStack
- the namespace stackwsPreserve
- if white spaces whould be preserved
-
-
Method Details
-
setDocumentLocator
Sets the document locator of the current parsed inputsource- Specified by:
setDocumentLocator
in interfaceContentHandler
- Specified by:
setDocumentLocator
in interfaceDocumentHandler
- Parameters:
locator
- the Locator of the current parsed inputsource
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Specified by:
startDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Specified by:
endDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Specified by:
ignorableWhitespace
in interfaceDocumentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Specified by:
processingInstruction
in interfaceDocumentHandler
- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startElement
- Specified by:
startElement
in interfaceDocumentHandler
- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException Implementation ofContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceDocumentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Specified by:
characters
in interfaceDocumentHandler
- Throws:
SAXException
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
getStartingNode
-