public class XmlUtils extends Object
| Constructor and Description |
|---|
XmlUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkRootElement(Document document,
String expectedRootElementName) |
static void |
flush(Document in,
OutputStream out) |
static void |
flush(Document in,
OutputStream out,
Map<String,String> outputProperties) |
static Element |
getUniqueElement(Document document,
String xpathExpression) |
static Element |
getUniqueElement(Element element,
String xpathExpression) |
static Element |
getUniqueElement(Node element,
String xpathExpression) |
static void |
insertSiblingAfter(Element newElement,
Element sibling) |
static Document |
loadXmlDocumentFromFile(File file) |
static Document |
loadXmlDocumentFromPath(Path path) |
static Document |
loadXmlDocumentFromStream(InputStream in) |
public static Document loadXmlDocumentFromFile(@Nonnull File file) throws ParserConfigurationException, IOException, SAXException
public static Document loadXmlDocumentFromPath(@Nonnull Path path) throws ParserConfigurationException, IOException, SAXException
public static Document loadXmlDocumentFromStream(@Nonnull InputStream in) throws ParserConfigurationException, IOException, SAXException
public static void checkRootElement(@Nonnull Document document, @Nullable String expectedRootElementName)
public static void flush(Document in, OutputStream out) throws RuntimeException
RuntimeExceptionpublic static void flush(Document in, OutputStream out, Map<String,String> outputProperties)
Copyright © 2013. All Rights Reserved.