com.dynamide.util
Class XDBElement

java.lang.Object
  extended by com.dynamide.util.XDBElement

public class XDBElement
extends java.lang.Object

The functions in this class that return XDBElement can be used in an introspection framework, specifically WebMacro.

Author:
Laramie Crocker

Constructor Summary
XDBElement(XDB xdb, org.jdom.Element element)
           
 
Method Summary
 XDBElement first(java.lang.String xpath)
          Same as calling selectFirst(xpath) on the Element.
 java.lang.String get(java.lang.Object key)
          returns the Element.valueOf(key) where key gets turned into a String.
 org.jdom.Element getElement()
           
 java.util.List list(java.lang.String xpathExpression)
          Returns a List of XDBElement, rather than org.jdom.Element.
 java.lang.String output()
          Returns current node as XML, including the tag for the current node.
 java.lang.String outputContent()
          Returns all the child nodes as XML, excluding the tag for the current node.
 java.util.List select(java.lang.String xpathExpression)
          Returns a List of org.jdom.Element.
 org.jdom.Element selectFirst(java.lang.String xpathExpression)
           
 java.lang.String toString()
          This function does double-duty: with an Element, it returns getText(), which works with both the text of the node and with attribute values.
 java.lang.String valueOf(java.lang.String xpathExpression)
           
 java.lang.String valueOfAll(java.lang.String xpathExpression)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XDBElement

public XDBElement(XDB xdb,
                  org.jdom.Element element)
Method Detail

getElement

public org.jdom.Element getElement()

select

public java.util.List select(java.lang.String xpathExpression)
Returns a List of org.jdom.Element.

Parameters:
xpathExpression -
Returns:
A List of org.jdom.Element

list

public java.util.List list(java.lang.String xpathExpression)
Returns a List of XDBElement, rather than org.jdom.Element.

Parameters:
xpathExpression -
Returns:
A List of XDBElement

selectFirst

public org.jdom.Element selectFirst(java.lang.String xpathExpression)

valueOf

public java.lang.String valueOf(java.lang.String xpathExpression)

valueOfAll

public java.lang.String valueOfAll(java.lang.String xpathExpression)

first

public XDBElement first(java.lang.String xpath)
Same as calling selectFirst(xpath) on the Element.


output

public java.lang.String output()
Returns current node as XML, including the tag for the current node.


outputContent

public java.lang.String outputContent()
Returns all the child nodes as XML, excluding the tag for the current node.


get

public java.lang.String get(java.lang.Object key)
returns the Element.valueOf(key) where key gets turned into a String.


toString

public java.lang.String toString()
This function does double-duty: with an Element, it returns getText(), which works with both the text of the node and with attribute values.

Overrides:
toString in class java.lang.Object


Copyright © 2001-2013 DYNAMIDE.COM. All Rights Reserved.