public final class XmlExtensions
extends java.lang.Object
XmlExtensions.| Constructor and Description |
|---|
XmlExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static org.xml.sax.InputSource |
getInputSource(java.lang.String xmlString)
Gets the input source from the given xml string.
|
static <T> T |
loadObject(java.io.File xmlFile)
Load from the given file name that should represent an xml file and transform it to the
generic type object.
|
static <T> T |
loadObject(java.lang.String xmlFileName)
Load from the given file name that should represent an xml file and transform it to the
generic type object.
|
static java.lang.String |
newTag(java.lang.String tagname,
java.lang.String value,
java.util.Map<java.lang.String,java.lang.String> attributes)
Creates a tag from the given string values.
|
public static org.xml.sax.InputSource getInputSource(java.lang.String xmlString)
xmlString - the xml as string objectpublic static <T> T loadObject(java.io.File xmlFile)
throws java.io.IOException
T - the generic typexmlFile - the xml filejava.io.IOException - Signals that an I/O exception has occurred.public static <T> T loadObject(java.lang.String xmlFileName)
throws java.io.IOException
T - the generic typexmlFileName - the xml file namejava.io.IOException - Signals that an I/O exception has occurred.public static java.lang.String newTag(java.lang.String tagname,
java.lang.String value,
java.util.Map<java.lang.String,java.lang.String> attributes)
tagname - the tag namevalue - the value from the tagattributes - a map with the attributes