Class CmsXmlGenericWrapper

java.lang.Object
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

    Modifier and Type
    Method
    Description
    static List<org.dom4j.Node>
    content(org.dom4j.Element element)
    Provides a type safe / generic wrapper for Branch.content().
    static Iterable<org.dom4j.Element>
    elementIterable(org.dom4j.Element element, String name)
    Returns an element iterator.
    static Iterator<org.dom4j.Element>
    elementIterator(org.dom4j.Element element)
    Provides a type safe / generic wrapper for Element.elementIterator(org.dom4j.QName).
    static Iterator<org.dom4j.Element>
    elementIterator(org.dom4j.Element element, String name)
    Provides a type safe / generic wrapper for Element.elementIterator(String).
    static List<org.dom4j.Element>
    elements(org.dom4j.Element element)
    Provides a type safe / generic wrapper for Element.elements().
    static List<org.dom4j.Element>
    elements(org.dom4j.Element element, String name)
    Provides a type safe / generic wrapper for Element.elements(String).
    static List<org.dom4j.Element>
    elements(org.dom4j.Element element, org.dom4j.QName name)
    Provides a type safe / generic wrapper for Element.elements(org.dom4j.QName).
    static List<org.dom4j.Node>
    selectNodes(org.dom4j.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 Details

    • content

      public static List<org.dom4j.Node> content(org.dom4j.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<org.dom4j.Element> elementIterable(org.dom4j.Element element, String name)
      Returns an element iterator.

      Parameters:
      element - the element
      name - the name
      Returns:
      the iterator
    • elementIterator

      public static Iterator<org.dom4j.Element> elementIterator(org.dom4j.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<org.dom4j.Element> elementIterator(org.dom4j.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<org.dom4j.Element> elements(org.dom4j.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<org.dom4j.Element> elements(org.dom4j.Element element, org.dom4j.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<org.dom4j.Element> elements(org.dom4j.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<org.dom4j.Node> selectNodes(org.dom4j.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)