org.exolab.castor.xml.util

Class SAX2ANY

public class SAX2ANY extends Object implements 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: 1.1.1.1 $ $Date: 2003/03/03 07:09:48 $

Author: Constructor Summary SAX2ANY()

Default constructor
SAX2ANY(Namespaces context)
Constructs a SAX2ANY given a namespace context.
Method Summary
voidcharacters(char[] ch, int start, int length)
voidendDocument()
voidendElement(String name)
voidendElement(String namespaceURI, String localName, String qName)
voidendPrefixMapping(String prefix)
voiderror(SAXParseException e)
voidfatalError(SAXParseException e)
NamespacesgetNamespaceContext()
Get the namespace context of this SAX2ANY handler.
AnyNodegetStartingNode()
voidignorableWhitespace(char[] ch, int start, int length)
voidprocessingInstruction(String target, String data)
voidsetDocumentLocator(Locator locator)
Sets the document locator of the current parsed inputsource
voidsetNamespaceContext(Namespaces context)
Set the namespace context in which this handler acts.
voidskippedEntity(String name)
voidstartDocument()
voidstartElement(String name, AttributeList atts)
Implementation of {@link org.xml.sax.DocumentHandler#startElement}
voidstartElement(String namespaceURI, String localName, String qName, Attributes atts)
Implementation of {@link org.xml.sax.ContentHandler#startElement}
voidstartPrefixMapping(String prefix, String uri)
voidwarning(SAXParseException e)

Constructor Detail

SAX2ANY

public SAX2ANY()
Default constructor

SAX2ANY

public SAX2ANY(Namespaces context)
Constructs a SAX2ANY given a namespace context.

Parameters: context the namespace context in which this handler acts.

Method Detail

characters

public void characters(char[] ch, int start, int length)

endDocument

public void endDocument()

endElement

public void endElement(String name)

endElement

public void endElement(String namespaceURI, String localName, String qName)

endPrefixMapping

public void endPrefixMapping(String prefix)

error

public void error(SAXParseException e)

fatalError

public void fatalError(SAXParseException e)

getNamespaceContext

public Namespaces getNamespaceContext()
Get the namespace context of this SAX2ANY handler. If the SAX2ANY handler is called during the processing of an XML document, it may happen that the XML fragment parsed by the SAX2ANY handler contains references to namespaces declared in the given context.

Returns: the namespace context to interact with while parsing an XML fragment with the SAX2ANY handler

getStartingNode

public AnyNode getStartingNode()

ignorableWhitespace

public void ignorableWhitespace(char[] ch, int start, int length)

processingInstruction

public void processingInstruction(String target, String data)

setDocumentLocator

public void setDocumentLocator(Locator locator)
Sets the document locator of the current parsed inputsource

Parameters: locator the Locator of the current parsed inputsource

setNamespaceContext

public void setNamespaceContext(Namespaces context)
Set the namespace context in which this handler acts. If this handler is called during the processing of an XML document, it may happen that the XML fragment parsed by the SAX2ANY handler contains references to namespaces declared in the given context.

Parameters: context the namespace context to interact with while parsing an XML fragment with the SAX2ANY handler.

skippedEntity

public void skippedEntity(String name)

startDocument

public void startDocument()

startElement

public void startElement(String name, AttributeList atts)
Implementation of {@link org.xml.sax.DocumentHandler#startElement}

startElement

public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
Implementation of {@link org.xml.sax.ContentHandler#startElement}

startPrefixMapping

public void startPrefixMapping(String prefix, String uri)

warning

public void warning(SAXParseException e)
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com