public class XmlFileLoader extends Object
Constructor and Description |
---|
XmlFileLoader() |
Modifier and Type | Method and Description |
---|---|
static org.apache.xmlbeans.XmlObject |
loadSoapBodyFromXmlFileViaClassloader(String filePath,
String nodeName,
Class<?> clazz)
Reads a SOAP XML file and parses its body into an
XmlObject . |
static org.apache.xmlbeans.XmlObject |
loadXmlFileViaClassloader(String filePath,
Class<?> clazz)
Loads XML files which can be found via the
clazz 's ClassLoader . |
public static org.apache.xmlbeans.XmlObject loadSoapBodyFromXmlFileViaClassloader(String filePath, String nodeName, Class<?> clazz) throws org.apache.xmlbeans.XmlException, IOException
XmlObject
.file
- file name of the file to parsenodeName
- name of the node contained by the SOAP bodyXmlObject
representation of the XML fileorg.apache.xmlbeans.XmlException
- if parsing to XML failsIOException
- if file could not be readpublic static org.apache.xmlbeans.XmlObject loadXmlFileViaClassloader(String filePath, Class<?> clazz) throws org.apache.xmlbeans.XmlException, IOException
clazz
's ClassLoader
. If not found the
FileContentLoader
's ClassLoader
is asked to load the file. If file could not be found
an exception is thrown.filePath
- the path to the file to be loaded.clazz
- the class which ClassLoader
to be used.org.apache.xmlbeans.XmlException
- if file could not be parsed into XMLIOException
- if file could not be read.IllegalArgumentException
- if file path is null
or emptyFileNotFoundException
- if the resource could not be found be the clazz
's ClassLoader
Copyright © 2012–2017 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.