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
ParserConfigurationException
public 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
TransformerException
public static void outputToStream(Element document, OutputStream outputStream) throws TransformerException
TransformerException
public static Element selectSingleElement(Element element, String xpathExpression) throws XPathExpressionException
XPathExpressionException
public static ArrayList<Element> selectElements(Element element, String xpathExpression) throws XPathExpressionException
XPathExpressionException
Copyright © 2000–2016 BioJava. All rights reserved.