
public final class XMLUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
XMLUtil.ElementHandler |
| Modifier and Type | Method and Description |
|---|---|
static DocumentBuilder |
createDocumentBuilder() |
static int |
handleChildElements(Element rootElement,
XMLUtil.ElementHandler handler) |
static int |
handleElements(NodeList nodeList,
XMLUtil.ElementHandler handler) |
static int |
handleElementsByTagName(Element rootElement,
String tagName,
XMLUtil.ElementHandler handler) |
static Document |
loadDocument(DocumentBuilder documentBuilder,
File file) |
static Element |
loadRootElement(DocumentBuilder documentBuilder,
File file) |
public static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException
ParserConfigurationExceptionpublic static Element loadRootElement(DocumentBuilder documentBuilder, File file) throws Exception
Exceptionpublic static Document loadDocument(DocumentBuilder documentBuilder, File file) throws SAXException, IOException
SAXExceptionIOExceptionpublic static int handleElements(NodeList nodeList, XMLUtil.ElementHandler handler) throws Exception
Exceptionpublic static int handleChildElements(Element rootElement, XMLUtil.ElementHandler handler) throws Exception
Exceptionpublic static int handleElementsByTagName(Element rootElement, String tagName, XMLUtil.ElementHandler handler) throws Exception
ExceptionCopyright (c) 2011-2014 Eike Stepper (Berlin, Germany) and others.