| java.lang.Object org.ofbiz.base.util.UtilXml
UtilXml | public class UtilXml (Code) | | Utilities methods to simplify dealing with JAXP & DOM XML parsing
author: David E. Jones version: $Revision: 1.3 $ since: 2.0 |
Inner Class :public static class LocalResolver implements EntityResolver | |
Inner Class :public static class LocalErrorHandler implements ErrorHandler | |
Method Summary | |
public static Element | addChildElement(Element element, String childElementName, Document document) Creates a child element with the given name and appends it to the element child node list. | public static Element | addChildElementCDATAValue(Element element, String childElementName, String childElementValue, Document document) Creates a child element with the given name and appends it to the element child node list. | public static Element | addChildElementValue(Element element, String childElementName, String childElementValue, Document document) Creates a child element with the given name and appends it to the element child node list. | public static boolean | checkBoolean(String str) | public static boolean | checkBoolean(String str, boolean defaultValue) | public static String | checkEmpty(String string) | public static String | checkEmpty(String string1, String string2) | public static String | checkEmpty(String string1, String string2, String string3) | public static List | childElementList(Element element, String childElementName) Return a List of Element objects that have the given name and are
immediate children of the given element; if name is null, all child
elements will be included. | public static String | childElementValue(Element element, String childElementName) Return the text (node value) contained by the named child node. | public static String | childElementValue(Element element, String childElementName, String defaultValue) Return the text (node value) contained by the named child node or a default value if null. | public static String | elementValue(Element element) Return the text (node value) of the first node under this, works best if normalized. | public static Element | firstChildElement(Element element, String childElementName) Return the first child Element with the given name; if name is null
returns the first element. | public static Element | firstChildElement(Element element, String childElementName, String attrName, String attrValue) Return the first child Element with the given name; if name is null
returns the first element. | public static Document | makeEmptyXmlDocument() | public static Document | makeEmptyXmlDocument(String rootElementName) | public static Document | readXmlDocument(String content) | public static Document | readXmlDocument(String content, boolean validate) | public static Document | readXmlDocument(URL url) | public static Document | readXmlDocument(URL url, boolean validate) | public static Document | readXmlDocument(InputStream is) | public static Document | readXmlDocument(InputStream is, boolean validate, String docDescription) | public static String | writeXmlDocument(Document document) | public static void | writeXmlDocument(String filename, Document document) | public static void | writeXmlDocument(OutputStream os, Document document) |
addChildElement | public static Element addChildElement(Element element, String childElementName, Document document)(Code) | | Creates a child element with the given name and appends it to the element child node list.
|
addChildElementCDATAValue | public static Element addChildElementCDATAValue(Element element, String childElementName, String childElementValue, Document document)(Code) | | Creates a child element with the given name and appends it to the element child node list.
Also creates a CDATASection node with the given value and appends it to the new elements child node list.
|
addChildElementValue | public static Element addChildElementValue(Element element, String childElementName, String childElementValue, Document document)(Code) | | Creates a child element with the given name and appends it to the element child node list.
Also creates a Text node with the given value and appends it to the new elements child node list.
|
checkBoolean | public static boolean checkBoolean(String str)(Code) | | |
checkBoolean | public static boolean checkBoolean(String str, boolean defaultValue)(Code) | | |
childElementList | public static List childElementList(Element element, String childElementName)(Code) | | Return a List of Element objects that have the given name and are
immediate children of the given element; if name is null, all child
elements will be included.
|
childElementValue | public static String childElementValue(Element element, String childElementName)(Code) | | Return the text (node value) contained by the named child node.
|
childElementValue | public static String childElementValue(Element element, String childElementName, String defaultValue)(Code) | | Return the text (node value) contained by the named child node or a default value if null.
|
elementValue | public static String elementValue(Element element)(Code) | | Return the text (node value) of the first node under this, works best if normalized.
|
firstChildElement | public static Element firstChildElement(Element element, String childElementName)(Code) | | Return the first child Element with the given name; if name is null
returns the first element.
|
firstChildElement | public static Element firstChildElement(Element element, String childElementName, String attrName, String attrValue)(Code) | | Return the first child Element with the given name; if name is null
returns the first element.
|
makeEmptyXmlDocument | public static Document makeEmptyXmlDocument()(Code) | | |
|
|