com.sun.msv.schematron.util
Class DOMBuilder

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.sun.msv.schematron.util.DOMBuilder
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class DOMBuilder
extends DefaultHandler

builds DOM from SAX2 event stream.


Constructor Summary
DOMBuilder()
           
DOMBuilder(DocumentBuilder builder)
           
 
Method Summary
 void characters(char[] buf, int start, int len)
           
 void endElement(String ns, String local, String qname)
           
 Document getDocument()
          returns DOM.
 void ignorableWhitespace(char[] buf, int start, int len)
           
 void startDocument()
           
 void startElement(String ns, String local, String qname, Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMBuilder

public DOMBuilder(DocumentBuilder builder)

DOMBuilder

public DOMBuilder()
           throws ParserConfigurationException
Throws:
ParserConfigurationException
Method Detail

getDocument

public Document getDocument()
returns DOM. This method should be called after the parsing was completed.


startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class DefaultHandler
Throws:
SAXException

startElement

public void startElement(String ns,
                         String local,
                         String qname,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String ns,
                       String local,
                       String qname)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException

characters

public void characters(char[] buf,
                       int start,
                       int len)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] buf,
                                int start,
                                int len)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
Overrides:
ignorableWhitespace in class DefaultHandler
Throws:
SAXException