com.webmethods.caf.faces.data.tree.object
Class XMLElementNode2

java.lang.Object
  extended by com.webmethods.caf.faces.data.tree.object.BaseXMLNode
      extended by com.webmethods.caf.faces.data.tree.object.XMLElementNode2
All Implemented Interfaces:
IContentProvider, INode

public class XMLElementNode2
extends BaseXMLNode

Adapts a W3C DOM Element to a CAF tree INode and CAF data IContentProvider (as a IContentProvider, binding-expression access to the node's properties can be optimized). A unique id for each element in the tree is auto-generated. If the tree's content changes frequently, you should use a XMLDOMNode instead, using a xpath expression to specify node ids.


Field Summary
protected  Element m_element
           
 
Fields inherited from class com.webmethods.caf.faces.data.tree.object.BaseXMLNode
m_children, m_id, m_parent, m_xpathAPI, m_xpathCache
 
Constructor Summary
XMLElementNode2(Element element)
          Adapts W3C DOM element (and element tree below it) to a CAF tree node.
XMLElementNode2(Element element, CachedXPathAPI xpathAPI)
           
 
Method Summary
 List getChildren()
          List of INode children, in order.
 String getId()
          Row id.
protected  Node getXMLNode()
          Wrapped DOM node.
 
Methods inherited from class com.webmethods.caf.faces.data.tree.object.BaseXMLNode
getData, getParent, getPropertyKeys, getType, getValue, getXPathAPI, getXPathValue, hasProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
toString
 

Field Detail

m_element

protected Element m_element
Constructor Detail

XMLElementNode2

public XMLElementNode2(Element element)
Adapts W3C DOM element (and element tree below it) to a CAF tree node.

Parameters:
element - W3C DOM element to adapt.

XMLElementNode2

public XMLElementNode2(Element element,
                       CachedXPathAPI xpathAPI)
Method Detail

getId

public String getId()
Description copied from interface: INode
Row id.


getChildren

public List getChildren()
Description copied from interface: INode
List of INode children, in order. Empty list (non-null) for leaf nodes.


getXMLNode

protected Node getXMLNode()
Description copied from class: BaseXMLNode
Wrapped DOM node.

Specified by:
getXMLNode in class BaseXMLNode