public class XmlDataLoader extends java.lang.Object implements DataLoader
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPTION_INDEX |
static java.lang.String |
OPTION_NAMESPACE_AWARE |
static java.lang.String |
OPTION_REMOVE_COMMENTS |
static java.lang.String |
OPTION_REMOVE_PIS |
static java.lang.String |
OPTION_VALIDATE |
static java.lang.String |
OPTION_XINCLUDE_AWARE |
static java.lang.String |
OPTION_XMLNS |
Constructor and Description |
---|
XmlDataLoader() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isOptionName(java.lang.String optionName)
Checks if the string is a valid xml data loader option name.
|
java.lang.Object |
load(Engine engine,
java.util.List args) |
freemarker.template.TemplateNodeModel |
load(Engine engine,
java.util.List args,
org.w3c.dom.Document preLoadedDoc) |
static org.w3c.dom.Document |
loadXmlFile(Engine engine,
java.io.File xmlFile,
boolean namespaceAware,
boolean validate) |
static org.w3c.dom.Document |
loadXmlFile(Engine engine,
java.io.File xmlFile,
boolean namespaceAware,
boolean xincludeAware,
boolean validate) |
public static final java.lang.String OPTION_REMOVE_COMMENTS
public static final java.lang.String OPTION_REMOVE_PIS
public static final java.lang.String OPTION_NAMESPACE_AWARE
public static final java.lang.String OPTION_XINCLUDE_AWARE
public static final java.lang.String OPTION_VALIDATE
public static final java.lang.String OPTION_INDEX
public static final java.lang.String OPTION_XMLNS
public java.lang.Object load(Engine engine, java.util.List args) throws java.lang.Exception
load
in interface DataLoader
args
- Arguments that the caller specifies for this directive call.
Not null.
The implementation should check if it understands all arguments,
and it should throw java.lang.IllegalArgumentException
if it doesn't.freemarker.template.TemplateModel
, then it
will not be wrapped, as it is already an FTL variable.java.lang.Exception
public freemarker.template.TemplateNodeModel load(Engine engine, java.util.List args, org.w3c.dom.Document preLoadedDoc) throws java.lang.Exception
java.lang.Exception
public static boolean isOptionName(java.lang.String optionName)
public static org.w3c.dom.Document loadXmlFile(Engine engine, java.io.File xmlFile, boolean namespaceAware, boolean validate) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
public static org.w3c.dom.Document loadXmlFile(Engine engine, java.io.File xmlFile, boolean namespaceAware, boolean xincludeAware, boolean validate) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException