Class XMLUtils
java.lang.Object
org.deltava.util.XMLUtils
- Direct Known Subclasses:
KMLUtils
A utility class for performing XML operations.
- Since:
- 1.0
- Version:
- 11.2
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddIfPresent(Element be, Element e) Adds a child XML document element to an existing element, if it is not nullstatic ElementcreateElement(String name, String value) Creates a new XML document element.static ElementcreateElement(String name, String value, boolean asCDATA) Creates a new XML document element.static ElementcreateElement(String name, String subElementName, String value) Creates a new XML document element, with an embedded child element.static ElementcreateIfPresent(String name, String value) Creates a new XML document element if the value is not null or empty.static StringConverts an XML document into text using a specific character set.static StringgetChildText(Element e, String... names) Finds a child element multiple levels down and returns its value.static booleanhasElement(Element e, String name) Returns if an XML element contains a child element with a particular name.static voidsetChildText(Element e, String ceName, String value) Updates a child element's text.static StringRemoves invalid unicode characters from an XML element.
-
Constructor Details
-
XMLUtils
protected XMLUtils()
-
-
Method Details
-
getChildText
-
createElement
-
createElement
-
createIfPresent
-
createElement
-
hasElement
-
addIfPresent
-
setChildText
-
format
-
stripInvalidUnicode
-