Modifier and Type | Method and Description |
---|---|
static Document |
readXmlFileAsDocument(String fileName)
Reads the xml file with the supplied fileName.
|
static Document |
readXmlInputStreamAsDocument(InputStream inputStream)
Reads xml from the supplied inputStream.
|
public static Document readXmlFileAsDocument(String fileName)
fileName
- The file containing the xml.IllegalArgumentException
- When the supplied fileName is empty.NullPointerException
- When the supplied fileName is null.XmlException
- When the xml file could not be found, read or
processed.public static Document readXmlInputStreamAsDocument(InputStream inputStream)
inputStream
- The InputStream to read the xml from.NullPointerException
- When the supplied inputStream is null.XmlException
- When the xml could not be read and parsed from the
inputStream.Copyright © 2008–2018. All rights reserved.