public class XMLHelper extends Object
| Constructor and Description |
|---|
XMLHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Element |
addChildElement(Element parentElement,
String elementName) |
static Document |
getNewDocument() |
static Document |
inputStreamToDocument(InputStream inputStream) |
static Document |
loadXML(String fileName) |
static void |
outputToStream(Document document,
OutputStream outputStream) |
static void |
outputToStream(Element document,
OutputStream outputStream) |
static ArrayList<Element> |
selectElements(Element element,
String xpathExpression) |
static Element |
selectParentElement(Element element,
String parentName) |
static Element |
selectSingleElement(Element element,
String xpathExpression) |
public static Document getNewDocument() throws ParserConfigurationException
ParserConfigurationExceptionpublic static Document loadXML(String fileName) throws SAXException, IOException, ParserConfigurationException
public static Document inputStreamToDocument(InputStream inputStream) throws SAXException, IOException, ParserConfigurationException
public static void outputToStream(Document document, OutputStream outputStream) throws TransformerException
TransformerExceptionpublic static void outputToStream(Element document, OutputStream outputStream) throws TransformerException
TransformerExceptionpublic static Element selectSingleElement(Element element, String xpathExpression) throws XPathExpressionException
XPathExpressionExceptionpublic static ArrayList<Element> selectElements(Element element, String xpathExpression) throws XPathExpressionException
XPathExpressionExceptionCopyright © 2000–2016 BioJava. All rights reserved.