|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.util.XMLUtil
public class XMLUtil
XMLUtil
...
Constructor Summary | |
---|---|
XMLUtil()
|
Method Summary | |
---|---|
static String |
getAttribute(Element parent,
String localName,
String namespaceURI)
Returns the value of the named attribute of the current element. |
static Element |
getChildElement(Node parent,
String childLocalName,
String childNamespaceURI)
Returns the first child element that matches the given local name and namespace. |
static String |
getChildText(Element parent,
String childLocalName,
String childNamespaceURI)
Calls getText(Element) on the first child element that matches
the given local name and namespace. |
static String |
getText(Element element)
Concatenates the values of all child nodes of type 'Text' or 'CDATA'/ |
static String |
getText(Element element,
String defaultValue)
Same as getText(Element) except that 'defaultValue' is returned
instead of null , if the element does not contain any text. |
static boolean |
isText(Node node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLUtil()
Method Detail |
---|
public static boolean isText(Node node)
node
-
public static String getText(Element element)
element
-
null
if the length of the resulting String is 0.isText(org.w3c.dom.Node)
public static String getText(Element element, String defaultValue)
getText(Element)
except that 'defaultValue' is returned
instead of null
, if the element does not contain any text.
element
- defaultValue
-
defaultValue
if the element does not contain any text.public static String getChildText(Element parent, String childLocalName, String childNamespaceURI)
getText(Element)
on the first child element that matches
the given local name and namespace.
parent
- childLocalName
- childNamespaceURI
-
null
.getText(Element)
public static Element getChildElement(Node parent, String childLocalName, String childNamespaceURI)
null
is returned.
parent
- childLocalName
- childNamespaceURI
-
null
.public static String getAttribute(Element parent, String localName, String namespaceURI)
parent
- localName
- attribute local name or 'nodeName' if no namespace is
specified.namespaceURI
- or null
null
if not found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |