org.objectweb.easybeans.util.xml
Class XMLUtils

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

public final class XMLUtils
extends java.lang.Object

Class with some useful methods on XML document.


Constructor Summary
private XMLUtils()
          Utility class, no constructor.
 
Method Summary
static java.lang.String getAttributeValue(org.w3c.dom.Element base, java.lang.String name)
          Returns the value of the attribute of the given element.
static java.util.Properties getPropertiesValueElement(java.lang.String ns, org.w3c.dom.Element base, java.lang.String name)
          Returns a Properties object matching the given node.
static java.util.List<java.lang.String> getStringListValueElement(java.lang.String ns, org.w3c.dom.Element base, java.lang.String name)
          Returns a list of value for the given node.
static java.lang.String getStringValueElement(java.lang.String ns, org.w3c.dom.Element base, java.lang.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
 

Constructor Detail

XMLUtils

private XMLUtils()
Utility class, no constructor.

Method Detail

getAttributeValue

public static java.lang.String getAttributeValue(org.w3c.dom.Element base,
                                                 java.lang.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 java.lang.String getStringValueElement(java.lang.String ns,
                                                     org.w3c.dom.Element base,
                                                     java.lang.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.

getPropertiesValueElement

public static java.util.Properties getPropertiesValueElement(java.lang.String ns,
                                                             org.w3c.dom.Element base,
                                                             java.lang.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 java.util.List<java.lang.String> getStringListValueElement(java.lang.String ns,
                                                                         org.w3c.dom.Element base,
                                                                         java.lang.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.