public final class XMLUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
XMLUtil.ElementHandler |
static class |
XMLUtil.ElementUpdater |
| 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 Document |
loadDocument(DocumentBuilder documentBuilder,
InputStream inputStream) |
static Element |
loadRootElement(DocumentBuilder documentBuilder,
File file) |
static Element |
loadRootElement(DocumentBuilder documentBuilder,
InputStream inputStream) |
public static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException
ParserConfigurationExceptionpublic static Document loadDocument(DocumentBuilder documentBuilder, InputStream inputStream) throws SAXException, IOException
SAXExceptionIOExceptionpublic static Document loadDocument(DocumentBuilder documentBuilder, File file) throws SAXException, IOException
SAXExceptionIOExceptionpublic static Element loadRootElement(DocumentBuilder documentBuilder, InputStream inputStream) throws Exception
Exceptionpublic static Element loadRootElement(DocumentBuilder documentBuilder, File file) throws Exception
Exceptionpublic 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) 2014 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html