|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ow2.util.xml.XMLUtils
public final class XMLUtils
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 QName |
getChildValueAsQName(Element base,
String name)
Extract a node's child value as a QName.
[base element (declaring the prefix/namespace mapping)]
#text-value: "prefix:local-part"
|
static Properties |
getPropertiesValueElement(String ns,
Element base,
String name)
Returns a Properties object matching the given node. |
static List<String> |
getStringListValueElement(Element base,
String name)
Returns a list of value for 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(Element base,
String name,
boolean trim)
Returns the value of the given node. |
static String |
getStringValueElement(String ns,
Element base,
String name)
Returns the value of the given node or null if the node is not found. |
static String |
getStringValueElement(String ns,
Element base,
String name,
boolean trim)
Returns the value of the given node or null if the node is not found. |
static QName |
getValueAsQName(Element base)
Extract a node's value as a QName.
[base element (declaring the prefix/namespace mapping)]
#text-value: "prefix:local-part"
|
static Document |
newDocument(boolean namespaceAware)
Creates a new empty Document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getStringValueElement(Element base,
String name)
base - the element from where to search.name - of the element to get.
public static String getStringValueElement(Element base,
String name,
boolean trim)
base - the element from where to search.name - of the element to get.trim - trim or not the value
public static String getAttributeValue(Element base,
String name)
base - the element from where to search.name - of the attribute to get.
public static String getStringValueElement(String ns,
Element base,
String name)
null if the node is not found.
ns - the namespace.base - the element from where to search.name - of the element to get.
public static String getStringValueElement(String ns,
Element base,
String name,
boolean trim)
null if the node is not found.
ns - the namespace.base - the element from where to search.name - of the element to get.trim - trim or not the returned value
public static String getChildStringValueForElement(Element base,
String name)
base - the element from where to search.name - of the element to get.
public static Properties getPropertiesValueElement(String ns,
Element base,
String name)
[base element]
<ns:name> (only 1)
<ns:property @name @value /> (0..n)
ns - the namespace.base - the element from where to search.name - of the element to get.
public static List<String> getStringListValueElement(String ns,
Element base,
String name)
ns - the namespace.base - the element from where to search.name - of the element to get.
public static List<String> getStringListValueElement(Element base,
String name)
base - the element from where to search.name - of the element to get.
public static QName getChildValueAsQName(Element base,
String name)
[base element (declaring the prefix/namespace mapping)]
#text-value: "prefix:local-part"
element - the element from where to search.
public static QName getValueAsQName(Element base)
[base element (declaring the prefix/namespace mapping)]
#text-value: "prefix:local-part"
base - the element from where to search.
public static Document newDocument(boolean namespaceAware)
namespaceAware - true if the created Document have to support namespaces.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||