| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Iterator | Returns: An iterator of children or null if element is null.The parent element element, String The name of the desired child tagName)Returns an iterator over the children of the given element with the given tag name. |
| public static String | Returns: The content of the element or null.The element to get the content for. element)Get the content of the given element. |
| public static String | Returns: The content of the element or the default.The element to get the content for. element, String The default to return when there is no content. defaultStr)Get the content of the given element. |
| public static Element | Returns: either the named child or nullthe parent element element, String the name of the desired child tagName)Gets the child of the specified element having the specified name. |
| public static Element | Returns: either the named child or the supplied defaultthe parent element element, String the name of the desired child tagName, Element the element to return if the child
doesn't exist defaultElement)Gets the child of the specified element having the specified name. |
| public static boolean | |
| public static String | Returns: The element content or null.The parent element. element, String The name of the desired child. tagName)Macro to get the content of an optional child element. |
| public static Element | Returns: The named child.The parent element element, String The name of the desired child tagName)Gets the child of the specified element having the specified unique name. |
| public static String | Returns: The element content or null.The parent element. element, String The name of the desired child. tagName)Macro to get the content of a unique child element. |
| XmlHelper | back to summary |
|---|---|
| private XmlHelper() | |
| getChildrenByTagName | back to summary |
|---|---|
| public static Iterator Returns an iterator over the children of the given element with the given tag name. | |
| getElementContent | back to summary |
|---|---|
| public static String getElementContent(final Element element) throws Exception Get the content of the given element. | |
| getElementContent | back to summary |
|---|---|
| public static String getElementContent(Element element, String defaultStr) throws Exception Get the content of the given element. | |
| getOptionalChild | back to summary |
|---|---|
| public static Element getOptionalChild(Element element, String tagName) throws Exception Gets the child of the specified element having the specified name. If the child with this name doesn't exist then null is returned instead. | |
| getOptionalChild | back to summary |
|---|---|
| public static Element getOptionalChild(Element element, String tagName, Element defaultElement) throws Exception Gets the child of the specified element having the specified name. If the child with this name doesn't exist then the supplied default element is returned instead. | |
| getOptionalChildBooleanContent | back to summary |
|---|---|
| public static boolean getOptionalChildBooleanContent(Element element, String name) throws Exception | |
| getOptionalChildContent | back to summary |
|---|---|
| public static String getOptionalChildContent(Element element, String tagName) throws Exception Macro to get the content of an optional child element. | |
| getUniqueChild | back to summary |
|---|---|
| public static Element getUniqueChild(Element element, String tagName) throws Exception Gets the child of the specified element having the specified unique name. If there are more than one children elements with the same name and exception is thrown. | |
| getUniqueChildContent | back to summary |
|---|---|
| public static String getUniqueChildContent(Element element, String tagName) throws Exception Macro to get the content of a unique child element. | |