|
|||||||||
| 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 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.lang.String |
getChildStringValueForElement(org.w3c.dom.Element base,
java.lang.String name)
Returns the value of the child node with the given name. |
static javax.xml.namespace.QName |
getChildValueAsQName(org.w3c.dom.Element base,
java.lang.String name)
Extract a node's child value as a QName.
[base element (declaring the prefix/namespace mapping)]
#text-value: "prefix:local-part"
|
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(org.w3c.dom.Element base,
java.lang.String name)
Returns a list of value for 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(org.w3c.dom.Element base,
java.lang.String name)
Returns the value of the given node. |
static java.lang.String |
getStringValueElement(org.w3c.dom.Element base,
java.lang.String name,
boolean trim)
Returns the value of 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 or null if the node is not found. |
static java.lang.String |
getStringValueElement(java.lang.String ns,
org.w3c.dom.Element base,
java.lang.String name,
boolean trim)
Returns the value of the given node or null if the node is not found. |
static javax.xml.namespace.QName |
getValueAsQName(org.w3c.dom.Element base)
Extract a node's value as a QName.
[base element (declaring the prefix/namespace mapping)]
#text-value: "prefix:local-part"
|
static org.w3c.dom.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 java.lang.String getStringValueElement(org.w3c.dom.Element base,
java.lang.String name)
base - the element from where to search.name - of the element to get.
public static java.lang.String getStringValueElement(org.w3c.dom.Element base,
java.lang.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 java.lang.String getAttributeValue(org.w3c.dom.Element base,
java.lang.String name)
base - the element from where to search.name - of the attribute to get.
public static java.lang.String getStringValueElement(java.lang.String ns,
org.w3c.dom.Element base,
java.lang.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 java.lang.String getStringValueElement(java.lang.String ns,
org.w3c.dom.Element base,
java.lang.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 java.lang.String getChildStringValueForElement(org.w3c.dom.Element base,
java.lang.String name)
base - the element from where to search.name - of the element to get.
public static java.util.Properties getPropertiesValueElement(java.lang.String ns,
org.w3c.dom.Element base,
java.lang.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 java.util.List<java.lang.String> getStringListValueElement(java.lang.String ns,
org.w3c.dom.Element base,
java.lang.String name)
ns - the namespace.base - the element from where to search.name - of the element to get.
public static java.util.List<java.lang.String> getStringListValueElement(org.w3c.dom.Element base,
java.lang.String name)
base - the element from where to search.name - of the element to get.
public static javax.xml.namespace.QName getChildValueAsQName(org.w3c.dom.Element base,
java.lang.String name)
[base element (declaring the prefix/namespace mapping)]
#text-value: "prefix:local-part"
element - the element from where to search.
public static javax.xml.namespace.QName getValueAsQName(org.w3c.dom.Element base)
[base element (declaring the prefix/namespace mapping)]
#text-value: "prefix:local-part"
base - the element from where to search.
public static org.w3c.dom.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 | ||||||||