|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.xml.XmlHelper
A utility class to cover up the rough bits of xml parsing
Constructor Summary | |
XmlHelper()
|
Method Summary | |
static java.util.Iterator |
getChildrenByTagName(org.w3c.dom.Element element,
java.lang.String tagName)
Returns an iterator over the children of the given element with the given tag name. |
static java.lang.String |
getElementContent(org.w3c.dom.Element element)
Get the content of the given element. |
static java.lang.String |
getElementContent(org.w3c.dom.Element element,
java.lang.String defaultStr)
Get the content of the given element. |
static org.w3c.dom.Element |
getOptionalChild(org.w3c.dom.Element element,
java.lang.String tagName)
Gets the child of the specified element having the specified name. |
static org.w3c.dom.Element |
getOptionalChild(org.w3c.dom.Element element,
java.lang.String tagName,
org.w3c.dom.Element defaultElement)
Gets the child of the specified element having the specified name. |
static boolean |
getOptionalChildBooleanContent(org.w3c.dom.Element element,
java.lang.String name)
|
static java.lang.String |
getOptionalChildContent(org.w3c.dom.Element element,
java.lang.String tagName)
Macro to get the content of an optional child element. |
static org.w3c.dom.Element |
getUniqueChild(org.w3c.dom.Element element,
java.lang.String tagName)
Gets the child of the specified element having the specified unique name. |
static java.lang.String |
getUniqueChildContent(org.w3c.dom.Element element,
java.lang.String tagName)
Macro to get the content of a unique child element. |
static void |
write(java.io.Writer out,
org.w3c.dom.Document dom)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XmlHelper()
Method Detail |
public static void write(java.io.Writer out, org.w3c.dom.Document dom) throws java.lang.Exception
java.lang.Exception
public static java.util.Iterator getChildrenByTagName(org.w3c.dom.Element element, java.lang.String tagName)
element
- The parent elementtagName
- The name of the desired child
public static org.w3c.dom.Element getUniqueChild(org.w3c.dom.Element element, java.lang.String tagName) throws java.lang.Exception
element
- The parent elementtagName
- The name of the desired child
java.lang.Exception
- Child was not found or was not unique.public static org.w3c.dom.Element getOptionalChild(org.w3c.dom.Element element, java.lang.String tagName) throws java.lang.Exception
element
- the parent elementtagName
- the name of the desired child
java.lang.Exception
public static org.w3c.dom.Element getOptionalChild(org.w3c.dom.Element element, java.lang.String tagName, org.w3c.dom.Element defaultElement) throws java.lang.Exception
element
- the parent elementtagName
- the name of the desired childdefaultElement
- the element to return if the child
doesn't exist
java.lang.Exception
public static java.lang.String getElementContent(org.w3c.dom.Element element) throws java.lang.Exception
element
- The element to get the content for.
java.lang.Exception
public static java.lang.String getElementContent(org.w3c.dom.Element element, java.lang.String defaultStr) throws java.lang.Exception
element
- The element to get the content for.defaultStr
- The default to return when there is no content.
java.lang.Exception
public static java.lang.String getUniqueChildContent(org.w3c.dom.Element element, java.lang.String tagName) throws java.lang.Exception
element
- The parent element.tagName
- The name of the desired child.
java.lang.Exception
public static java.lang.String getOptionalChildContent(org.w3c.dom.Element element, java.lang.String tagName) throws java.lang.Exception
element
- The parent element.tagName
- The name of the desired child.
java.lang.Exception
public static boolean getOptionalChildBooleanContent(org.w3c.dom.Element element, java.lang.String name) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |