public class XMLUtil extends SMYLDObject
NEW_LINE, OS_NEW_LINE| Constructor and Description |
|---|
XMLUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addChildElement(org.jdom2.Element parent,
String childName,
String childValue) |
static boolean |
getBooleanAttribute(org.jdom2.Element target,
String attName) |
static String |
getChildAttributeValue(org.jdom2.Element target,
String childName,
String childAttribute) |
static String |
getChildValue(org.jdom2.Element target,
String childName) |
static String |
getChildValue(org.jdom2.Element target,
String childName,
String defaultVal) |
static String |
getElementStringValue(org.jdom2.Element target) |
static String |
getElementValue(org.jdom2.Element target) |
static org.jdom2.Element |
getRootNode(byte[] bytes) |
static org.jdom2.Element |
getRootNode(File file) |
static org.jdom2.Element |
getRootNode(InputStream stream) |
static org.jdom2.Element |
getRootNode(String fileName) |
static org.jdom2.Element |
getRootNode(URL url) |
static boolean |
hasChildren(org.jdom2.Element curEl) |
static HashMap<String,org.jdom2.Element> |
loadElements(org.jdom2.Element parentElement,
String elementTag,
String keyAtt) |
static HashMap<String,String> |
loadElementsAsText(org.jdom2.Element parentElement,
String elementTag,
String keyAtt) |
static void |
setAttribute(org.jdom2.Element targetElement,
String attName,
String attValue) |
static void |
setChildValue(org.jdom2.Element target,
String childName,
org.jdom2.Element value) |
static void |
setChildValue(org.jdom2.Element target,
String childName,
String value) |
static void |
writeXMLFile(String targetFileName,
org.jdom2.Element xmlContents) |
debug, getLenName, insertInstanceValue, printInstanceValues, toStringpublic static void addChildElement(org.jdom2.Element parent,
String childName,
String childValue)
public static boolean getBooleanAttribute(org.jdom2.Element target,
String attName)
public static String getElementValue(org.jdom2.Element target)
public static String getChildValue(org.jdom2.Element target, String childName, String defaultVal)
public static void setAttribute(org.jdom2.Element targetElement,
String attName,
String attValue)
public static void setChildValue(org.jdom2.Element target,
String childName,
String value)
public static void setChildValue(org.jdom2.Element target,
String childName,
org.jdom2.Element value)
public static String getChildAttributeValue(org.jdom2.Element target, String childName, String childAttribute)
public static String getElementStringValue(org.jdom2.Element target) throws IOException
IOExceptionpublic static org.jdom2.Element getRootNode(URL url) throws IOException, org.jdom2.JDOMException
IOExceptionorg.jdom2.JDOMExceptionpublic static org.jdom2.Element getRootNode(File file) throws IOException, org.jdom2.JDOMException
IOExceptionorg.jdom2.JDOMExceptionpublic static org.jdom2.Element getRootNode(String fileName) throws IOException, org.jdom2.JDOMException
IOExceptionorg.jdom2.JDOMExceptionpublic static org.jdom2.Element getRootNode(InputStream stream) throws IOException, org.jdom2.JDOMException
IOExceptionorg.jdom2.JDOMExceptionpublic static org.jdom2.Element getRootNode(byte[] bytes)
throws IOException,
org.jdom2.JDOMException
IOExceptionorg.jdom2.JDOMExceptionpublic static void writeXMLFile(String targetFileName, org.jdom2.Element xmlContents) throws Exception
Exceptionpublic static boolean hasChildren(org.jdom2.Element curEl)
public static HashMap<String,String> loadElementsAsText(org.jdom2.Element parentElement, String elementTag, String keyAtt)
Copyright © 2019 SMYLD. All rights reserved.