org.opencms.xml
Class CmsXmlGenericWrapper

java.lang.Object
  extended by org.opencms.xml.CmsXmlGenericWrapper

public final class CmsXmlGenericWrapper
extends Object

Provides generic wrappers for XML library methods that do not support Java 5 generic types.

Since:
7.5.1

Method Summary
static List<Node> content(Element element)
          Provides a type safe / generic wrapper for Branch.content().
static Iterable<Element> elementIterable(Element element, String name)
           
static Iterator<Element> elementIterator(Element element)
          Provides a type safe / generic wrapper for Element.elementIterator(org.dom4j.QName).
static Iterator<Element> elementIterator(Element element, String name)
          Provides a type safe / generic wrapper for Element.elementIterator(String).
static List<Element> elements(Element element)
          Provides a type safe / generic wrapper for Element.elements().
static List<Element> elements(Element element, QName name)
          Provides a type safe / generic wrapper for Element.elements(org.dom4j.QName).
static List<Element> elements(Element element, String name)
          Provides a type safe / generic wrapper for Element.elements(String).
static List<Node> selectNodes(Document doc, String xpathExpression)
          Provides a type safe / generic wrapper for Node.selectNodes(String).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

content

public static List<Node> content(Element element)
Provides a type safe / generic wrapper for Branch.content().

Parameters:
element - the element to get the content for
Returns:
type safe access to Branch.content().


elementIterable

public static Iterable<Element> elementIterable(Element element,
                                                String name)

elementIterator

public static Iterator<Element> elementIterator(Element element)
Provides a type safe / generic wrapper for Element.elementIterator(org.dom4j.QName).

Parameters:
element - the element to iterate
Returns:
type safe access to Element.elementIterator(org.dom4j.QName).


elementIterator

public static Iterator<Element> elementIterator(Element element,
                                                String name)
Provides a type safe / generic wrapper for Element.elementIterator(String).

Parameters:
element - the element to iterate
name - the element name to match
Returns:
type safe access to Element.elementIterator(String).


elements

public static List<Element> elements(Element element)
Provides a type safe / generic wrapper for Element.elements().

Parameters:
element - the element to iterate
Returns:
type safe access to Element.elements().


elements

public static List<Element> elements(Element element,
                                     QName name)
Provides a type safe / generic wrapper for Element.elements(org.dom4j.QName).

Parameters:
element - the element to iterate
name - the element name to match
Returns:
type safe access to Element.elements(org.dom4j.QName).


elements

public static List<Element> elements(Element element,
                                     String name)
Provides a type safe / generic wrapper for Element.elements(String).

Parameters:
element - the element to iterate
name - the element name to match
Returns:
type safe access to Element.elements(String).


selectNodes

public static List<Node> selectNodes(Document doc,
                                     String xpathExpression)
Provides a type safe / generic wrapper for Node.selectNodes(String).

Parameters:
doc - the document to select the nodes from
xpathExpression - the XPATH expression to select
Returns:
type safe access to Node.selectNodes(String)