XML for Java 2.0.15

com.ibm.xml.dom
Class DeferredElementImpl

java.lang.Object
  |
  +--com.ibm.xml.dom.NodeImpl
        |
        +--com.ibm.xml.dom.ElementImpl
              |
              +--com.ibm.xml.dom.DeferredElementImpl

public class DeferredElementImpl
extends ElementImpl
implements DeferredNode

Elements represent most of the "markup" and structure of the document. They contain both the data for the element itself (element name and attributes), and any contained nodes, including document text (as children).

Elements may have Attributes associated with them; the API for this is defined in Node, but the function is implemented here. In general, XML applications should retrive Attributes as Nodes, since they may contain entity references and hence be a fairly complex sub-tree. HTML users will be dealing with simple string values, and convenience methods are provided to work in terms of Strings.

Since:
PR-DOM-Level-1-19980818.
Version:
Revision: 61 1.2 src/com/ibm/xml/dom/ElementImpl.java, parser, xml4j2
See Also:
Serialized Form

Field Summary
protected  int fNodeIndex
          Node index.
 
Fields inherited from class com.ibm.xml.dom.ElementImpl
attributes
 
Fields inherited from class com.ibm.xml.dom.NodeImpl
ELEMENT_DEFINITION_NODE, firstChild, kidOK, lastChild, name, nextSibling, ownerDocument, parentNode, previousSibling, readOnly, syncChildren, syncData, userData, value
 
Method Summary
 int getNodeIndex()
          Returns the node index.
protected  void synchronizeChildren()
          Synchronizes the node's children with the internal structure.
protected  void synchronizeData()
          Synchronizes the data (name and value) for fast nodes.
 
Methods inherited from class com.ibm.xml.dom.ElementImpl
cloneNode, getAttribute, getAttributeNode, getAttributes, getElementsByTagName, getNodeType, getNodeValue, getTagName, getValue, normalize, removeAttribute, removeAttributeNode, setAttribute, setAttributeNode, setNodeValue, setReadOnly, setupDefaultAttributes
 
Methods inherited from class com.ibm.xml.dom.NodeImpl
appendChild, changed, getChildNodes, getFirstChild, getLastChild, getLength, getNextSibling, getNodeName, getOwnerDocument, getParentNode, getPreviousSibling, getReadOnly, getUserData, hasChildNodes, insertBefore, isKidOK, item, removeChild, replaceChild, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fNodeIndex

protected transient int fNodeIndex
Node index.
Method Detail

getNodeIndex

public final int getNodeIndex()
Returns the node index.
Specified by:
getNodeIndex in interface DeferredNode

synchronizeData

protected final void synchronizeData()
Synchronizes the data (name and value) for fast nodes.
Overrides:
synchronizeData in class ElementImpl

synchronizeChildren

protected final void synchronizeChildren()
Synchronizes the node's children with the internal structure. Fluffing the children at once solves a lot of work to keep the two structures in sync. The problem gets worse when editing the tree -- this makes it a lot easier.
Overrides:
synchronizeChildren in class NodeImpl

XML for Java 2.0.15