net.sf.vex.dom
Class RootElement
java.lang.Object
|
+--net.sf.vex.dom.Node
|
+--net.sf.vex.dom.Element
|
+--net.sf.vex.dom.RootElement
- public class RootElement
- extends Element
The root element of a document. Keeps track of the document to which
it is associated. Any element can find the document to which it is
associated by following its parents to this root. This would be done,
for example, to notify document listeners that the document has changed
when the element changes.
Constructor Summary |
RootElement(java.lang.String name)
Class constructor |
Methods inherited from class net.sf.vex.dom.Element |
getAttribute, getAttributeNames, getChildElements, getChildIterator, getChildNodes, getName, getParent, isEmpty, removeAttribute, setAttribute, setParent, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RootElement
public RootElement(java.lang.String name)
- Class constructor
- Parameters:
name
- Name of the element.
getDocument
public Document getDocument()
- Overrides:
getDocument
in class Element
- Returns:
- The document associated with this element.
setDocument
public void setDocument(Document document)
- Sets the document to which this element is associated.
This is called by the document constructor, so it need not
be called by client code.
- Parameters:
document
- Document to which this root element is
associated.