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