fr.opensagres.xdocreport.core.utils
Class DOMUtils
java.lang.Object
fr.opensagres.xdocreport.core.utils.DOMUtils
public class DOMUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOMUtils
public DOMUtils()
load
public static Document load(InputStream stream)
throws ParserConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
SAXException
IOException
load
public static Document load(String xml)
throws ParserConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
SAXException
IOException
save
public static void save(Node node,
Writer writer)
throws TransformerException
- Throws:
TransformerException
save
public static void save(Node node,
OutputStream out)
throws TransformerException
- Throws:
TransformerException
getFirstChildElementByTagName
public static Element getFirstChildElementByTagName(Node parentNode,
String elementName)
- Returns the first child element retrieved by tag name from the parent node and null otherwise.
- Parameters:
parentNode
- parent node.elementName
- element name to found.
- Returns:
- the first child element
getFirstChildElementsByTagName
public static Collection<Element> getFirstChildElementsByTagName(Node contextNode,
String elementName)
- Returns list of the first child element retrieved by tag name from the parent node and null otherwise.
- Parameters:
parentNode
- parent node.elementName
- element name to found.
- Returns:
- list of the first child element
Copyright © 2013. All rights reserved.