Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public final class XmlUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Iterable<Element> |
iterableChildElementsByTagName(Element element,
String childTagName)
Iterates the children of the given element,
returning only returning child elements of the given name.
|
static Iterable<Element> |
iterableElements(NodeList nodeList)
Iterates over a NodeList, only returning Elements.
|
static Iterable<Node> |
iterableNodes(NodeList nodeList)
Iterates over a NodeList.
|
static Document |
parseXml(InputStream in)
Parses an XML DOM from an input stream.
|
static Document |
parseXml(URL url)
Fetches and parses an XML DOM from a URL.
|
static String |
toString(Document document) |
public static Document parseXml(URL url) throws IOException, ParserConfigurationException, SAXException
public static Document parseXml(InputStream in) throws IOException, ParserConfigurationException, SAXException
public static Iterable<Node> iterableNodes(NodeList nodeList)
public static Iterable<Element> iterableElements(NodeList nodeList)
public static Iterable<Element> iterableChildElementsByTagName(Element element, String childTagName)
public static String toString(Document document) throws TransformerConfigurationException, TransformerException
Copyright © 2000–2016 AO Industries, Inc.. All rights reserved.