public class DOMBuilder extends org.xml.sax.helpers.DefaultHandler
Modifier and Type | Field and Description |
---|---|
protected DocumentBuilder |
builder |
protected Document |
dom |
protected Node |
parent |
Constructor and Description |
---|
DOMBuilder() |
DOMBuilder(DocumentBuilder builder) |
Modifier and Type | Method and Description |
---|---|
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) |
endDocument, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
protected final DocumentBuilder builder
protected Document dom
protected Node parent
public DOMBuilder(DocumentBuilder builder)
public DOMBuilder() throws ParserConfigurationException
ParserConfigurationException
public Document getDocument()
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void startElement(String ns, String local, String qname, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void endElement(String ns, String local, String qname) throws SAXException
endElement
in interface ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void characters(char[] buf, int start, int len) throws SAXException
characters
in interface ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
SAXException
public void ignorableWhitespace(char[] buf, int start, int len) throws SAXException
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
SAXException
MSV