org.exolab.castor.xml.util
Class SAX2DOMHandler

java.lang.Object
  extended by org.xml.sax.HandlerBase
      extended by org.exolab.castor.xml.util.SAX2DOMHandler
All Implemented Interfaces:
DocumentHandler, DTDHandler, EntityResolver, ErrorHandler

public class SAX2DOMHandler
extends HandlerBase

A class for converting a SAX events to DOM nodes.

Author:
Andrew Fawcett

Constructor Summary
SAX2DOMHandler(Node node)
          Creates new instance of SAX2DOMHandler class.
 
Method Summary
 void characters(char[] chars, int offset, int length)
           
 void endElement(String name)
           
 void processingInstruction(String target, String data)
           
 void startElement(String name, AttributeList attributes)
           
 
Methods inherited from class org.xml.sax.HandlerBase
endDocument, error, fatalError, ignorableWhitespace, notationDecl, resolveEntity, setDocumentLocator, startDocument, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAX2DOMHandler

public SAX2DOMHandler(Node node)
Creates new instance of SAX2DOMHandler class.

Parameters:
node - the DOM node to use
Method Detail

startElement

public void startElement(String name,
                         AttributeList attributes)
Specified by:
startElement in interface DocumentHandler
Overrides:
startElement in class HandlerBase

characters

public void characters(char[] chars,
                       int offset,
                       int length)
Specified by:
characters in interface DocumentHandler
Overrides:
characters in class HandlerBase

endElement

public void endElement(String name)
Specified by:
endElement in interface DocumentHandler
Overrides:
endElement in class HandlerBase

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
Specified by:
processingInstruction in interface DocumentHandler
Overrides:
processingInstruction in class HandlerBase
Throws:
SAXException


Copyright © 2013. All Rights Reserved.