org.apache.commons.digester
private class NodeCreateRule.NodeBuilder extends DefaultHandler
Field Summary | |
---|---|
protected int | depth
Depth of the current node, relative to the element where the content
handler was put into action. |
protected Document | doc
A DOM Document used to create the various Node instances. |
protected ContentHandler | oldContentHandler
The content handler used by Digester before it was set to this
content handler. |
protected Node | root
The DOM node that will be pushed on Digester's stack. |
protected Node | top
The current top DOM mode. |
Constructor Summary | |
---|---|
NodeBuilder(Document doc, Node root)
Constructor.
|
Method Summary | |
---|---|
void | characters(char[] ch, int start, int length)
Appends a {@link org.w3c.dom.Text Text} node to the current node.
|
void | endElement(String namespaceURI, String localName, String qName)
Checks whether control needs to be returned to Digester.
|
void | processingInstruction(String target, String data)
Adds a new
{@link org.w3c.dom.ProcessingInstruction ProcessingInstruction} to
the current node.
|
void | startElement(String namespaceURI, String localName, String qName, Attributes atts)
Adds a new child {@link org.w3c.dom.Element Element} to the current
node.
|
Stores the content handler currently used by Digester so it can be reset when done, and initializes the DOM objects needed to build the node.
Parameters: doc the document to use to create nodes root the root node
Throws: ParserConfigurationException if the DocumentBuilderFactory could not be instantiated SAXException if the XMLReader could not be instantiated by Digester (should not happen)
Parameters: ch the characters from the XML document start the start position in the array length the number of characters to read from the array
Throws: SAXException if the DOM implementation throws an exception
Parameters: namespaceURI the namespace URI localName the local name qName the qualified (prefixed) name
Throws: SAXException if the DOM implementation throws an exception
Parameters: target the processing instruction target data the processing instruction data, or null if none was supplied
Throws: SAXException if the DOM implementation throws an exception
Parameters: namespaceURI the namespace URI localName the local name qName the qualified (prefixed) name atts the list of attributes
Throws: SAXException if the DOM implementation throws an exception