com.sun.msv.schematron.util
Class DOMBuilder
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.sun.msv.schematron.util.DOMBuilder
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class DOMBuilder
- extends DefaultHandler
builds DOM from SAX2 event stream.
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
builder
protected final DocumentBuilder builder
dom
protected Document dom
parent
protected Node parent
DOMBuilder
public DOMBuilder(DocumentBuilder builder)
DOMBuilder
public DOMBuilder()
throws ParserConfigurationException
- Throws:
ParserConfigurationException
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
MSV