public class XmlUtils extends Object
Constructor and Description |
---|
XmlUtils() |
Modifier and Type | Method and Description |
---|---|
static Element |
createTextElement(Document doc,
String name,
String value) |
static Element |
getChild(Element e,
String tagName) |
static List |
getChildren(Element e,
String tagName) |
static Element |
getElement(Element e,
String path) |
static List |
getElements(Element e,
String path) |
static String |
getTextValue(Element e) |
static Document |
newDocument() |
static DocumentBuilder |
newDocumentBuilder() |
static Transformer |
newTransformer() |
static Document |
parse(File file) |
static Document |
parse(InputStream is) |
static Document |
parse(URL url) |
static void |
removeChildren(Element e) |
static void |
setTextValue(Element e,
String s) |
static byte[] |
toByteArray(Node node) |
static String |
toString(Node node) |
public static void removeChildren(Element e)
public static Document parse(File file) throws SAXException, IOException
SAXException
IOException
public static Document parse(URL url) throws IOException, SAXException
IOException
SAXException
public static Document parse(InputStream is) throws SAXException, IOException
SAXException
IOException
public static DocumentBuilder newDocumentBuilder()
public static Document newDocument()
public static byte[] toByteArray(Node node) throws TransformerException
TransformerException
public static String toString(Node node) throws TransformerException
TransformerException
public static Transformer newTransformer() throws TransformerException
TransformerException