org.ow2.easybeans.util.xml
Class XMLUtils

java.lang.Object
  extended by org.ow2.easybeans.util.xml.XMLUtils

public final class XMLUtils
extends Object

Class with some useful methods on XML document.


Method Summary
static String getAttributeValue(Element base, String name)
          Returns the value of the attribute of the given element.
static String getChildStringValueForElement(Element base, String name)
          Returns the value of the child node with the given name.
static Properties getPropertiesValueElement(String ns, Element base, String name)
          Returns a Properties object matching the given node.
static List<String> getStringListValueElement(String ns, Element base, String name)
          Returns a list of value for the given node.
static String getStringValueElement(Element base, String name)
          Returns the value of the given node.
static String getStringValueElement(String ns, Element base, String name)
          Returns the value of the given node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAttributeValue

public static String getAttributeValue(Element base,
                                       String name)
Returns the value of the attribute of the given element.

Parameters:
base - the element from where to search.
name - of the attribute to get.
Returns:
the value of this element.

getStringValueElement

public static String getStringValueElement(String ns,
                                           Element base,
                                           String name)
Returns the value of the given node.

Parameters:
ns - the namespace.
base - the element from where to search.
name - of the element to get.
Returns:
the value of this element.

getStringValueElement

public static String getStringValueElement(Element base,
                                           String name)
Returns the value of the given node.

Parameters:
base - the element from where to search.
name - of the element to get.
Returns:
the value of this element.

getChildStringValueForElement

public static String getChildStringValueForElement(Element base,
                                                   String name)
Returns the value of the child node with the given name.

Parameters:
base - the element from where to search.
name - of the element to get.
Returns:
the value of this element.

getPropertiesValueElement

public static Properties getPropertiesValueElement(String ns,
                                                   Element base,
                                                   String name)
Returns a Properties object matching the given node.

Parameters:
ns - the namespace.
base - the element from where to search.
name - of the element to get.
Returns:
the value of this element.

getStringListValueElement

public static List<String> getStringListValueElement(String ns,
                                                     Element base,
                                                     String name)
Returns a list of value for the given node.

Parameters:
ns - the namespace.
base - the element from where to search.
name - of the element to get.
Returns:
the list of value of this element.


Copyright © 2006-2011 OW2 Consortium. All Rights Reserved.