public abstract class Node extends Object implements Serializable
Node
, focused on creation
rather than manipulation. To that end, all except for ElementNode
are immutable, and require their parent to provide context (ie, no back-
pointers).
Node
is defined as an abstract class (rather than an interface)
to allow declaration of protected methods and to provide helper methods.
Constructor and Description |
---|
Node() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
appendToElement(Element elem)
This method is called internally by
ElementNode , to append
its children to the DOM subtree rooted at the specified element. |
protected static String |
getLocalName(String qname)
Utility method to return a local name from either a qualified or
non-qualified name.
|
protected void |
toSAX(ContentHandler handler)
Invokes the passed
ContentHandler for this element
and its children. |
protected abstract void appendToElement(Element elem)
ElementNode
, to append
its children to the DOM subtree rooted at the specified element.protected void toSAX(ContentHandler handler) throws SAXException
ContentHandler
for this element
and its children. Default implementation does nothing (appropriate
for attributes only).SAXException