org.obe.xpdl.parser.dom4j
Class Util

java.lang.Object
  extended byorg.obe.xpdl.parser.dom4j.Util

public class Util
extends java.lang.Object


Method Summary
static org.dom4j.Element child(org.dom4j.Element element, java.lang.String name)
          Return the child element with the given name.
static java.util.List children(org.dom4j.Element element, java.lang.String name)
          Return the child elements with the given name.
static org.dom4j.Element detach(org.dom4j.Element element, org.dom4j.QName qname)
          Detaches an element from its parent and returns a child node.
static boolean elementAsBoolean(org.dom4j.Element element, java.lang.String name)
           
static java.util.Date elementAsDate(org.dom4j.Element element, java.lang.String name)
           
static Duration elementAsDuration(org.dom4j.Element element, java.lang.String name)
           
static DurationUnit elementAsDurationUnit(org.dom4j.Element element, java.lang.String name)
           
static int elementAsInteger(org.dom4j.Element element, java.lang.String name)
           
static java.lang.String elementAsString(org.dom4j.Element element, java.lang.String name)
          Return the value of the child element with the given name.
static java.net.URL elementAsURL(org.dom4j.Element element, java.lang.String name)
           
static java.lang.String exportToText(org.dom4j.Element element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

child

public static org.dom4j.Element child(org.dom4j.Element element,
                                      java.lang.String name)
Return the child element with the given name. The element must be in the same name space as the parent element.

Parameters:
element - The parent element
name - The child element name
Returns:
The child element

children

public static java.util.List children(org.dom4j.Element element,
                                      java.lang.String name)
Return the child elements with the given name. The elements must be in the same name space as the parent element.

Parameters:
element - The parent element
name - The child element name
Returns:
The child elements

detach

public static org.dom4j.Element detach(org.dom4j.Element element,
                                       org.dom4j.QName qname)
Detaches an element from its parent and returns a child node.

Parameters:
element - The element to detach.
qname - The qualified name of the child element to return.
Returns:
The child element.

elementAsString

public static java.lang.String elementAsString(org.dom4j.Element element,
                                               java.lang.String name)
Return the value of the child element with the given name. The element must be in the same name space as the parent element.

Parameters:
element - The parent element
name - The child element name
Returns:
The child element value

elementAsDate

public static java.util.Date elementAsDate(org.dom4j.Element element,
                                           java.lang.String name)
                                    throws XPDLParserException
Throws:
XPDLParserException

elementAsInteger

public static int elementAsInteger(org.dom4j.Element element,
                                   java.lang.String name)

elementAsBoolean

public static boolean elementAsBoolean(org.dom4j.Element element,
                                       java.lang.String name)

elementAsURL

public static java.net.URL elementAsURL(org.dom4j.Element element,
                                        java.lang.String name)
                                 throws XPDLParserException
Throws:
XPDLParserException

elementAsDuration

public static Duration elementAsDuration(org.dom4j.Element element,
                                         java.lang.String name)
                                  throws XPDLParserException
Throws:
XPDLParserException

elementAsDurationUnit

public static DurationUnit elementAsDurationUnit(org.dom4j.Element element,
                                                 java.lang.String name)
                                          throws XPDLParserException
Throws:
XPDLParserException

exportToText

public static java.lang.String exportToText(org.dom4j.Element element)
                                     throws XPDLParserException
Throws:
XPDLParserException


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.