Package org.biojava.nbio.core.util
Class XMLHelper
java.lang.Object
org.biojava.nbio.core.util.XMLHelper
- Author:
 - Scooter
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic ElementaddChildElement(Element parentElement, String elementName) static Documentstatic DocumentinputStreamToDocument(InputStream inputStream) static Documentstatic voidoutputToStream(Document document, OutputStream outputStream) static voidoutputToStream(Element document, OutputStream outputStream) selectElements(Element element, String xpathExpression) static ElementselectParentElement(Element element, String parentName) static ElementselectSingleElement(Element element, String xpathExpression)  
- 
Constructor Details
- 
XMLHelper
public XMLHelper() 
 - 
 - 
Method Details
- 
addChildElement
 - 
getNewDocument
- Throws:
 ParserConfigurationException
 - 
loadXML
public static Document loadXML(String fileName) throws SAXException, IOException, ParserConfigurationException  - 
inputStreamToDocument
public static Document inputStreamToDocument(InputStream inputStream) throws SAXException, IOException, ParserConfigurationException  - 
outputToStream
public static void outputToStream(Document document, OutputStream outputStream) throws TransformerException - Throws:
 TransformerException
 - 
outputToStream
public static void outputToStream(Element document, OutputStream outputStream) throws TransformerException - Throws:
 TransformerException
 - 
selectParentElement
 - 
selectSingleElement
public static Element selectSingleElement(Element element, String xpathExpression) throws XPathExpressionException - Throws:
 XPathExpressionException
 - 
selectElements
public static ArrayList<Element> selectElements(Element element, String xpathExpression) throws XPathExpressionException - Throws:
 XPathExpressionException
 
 -