public class XmlDataLoader extends Object implements DataLoader
Modifier and Type | Field and Description |
---|---|
static String |
OPTION_INDEX |
static String |
OPTION_NAMESPACE_AWARE |
static String |
OPTION_REMOVE_COMMENTS |
static String |
OPTION_REMOVE_PIS |
static String |
OPTION_VALIDATE |
static String |
OPTION_XINCLUDE_AWARE |
static String |
OPTION_XMLNS |
Constructor and Description |
---|
XmlDataLoader() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isOptionName(String optionName)
Checks if the string is a valid xml data loader option name.
|
Object |
load(Engine engine,
List args) |
TemplateNodeModel |
load(Engine engine,
List args,
Document preLoadedDoc) |
static Document |
loadXmlFile(Engine engine,
File xmlFile,
boolean namespaceAware,
boolean validate) |
static Document |
loadXmlFile(Engine engine,
File xmlFile,
boolean namespaceAware,
boolean xincludeAware,
boolean validate) |
public static final String OPTION_REMOVE_COMMENTS
public static final String OPTION_REMOVE_PIS
public static final String OPTION_NAMESPACE_AWARE
public static final String OPTION_XINCLUDE_AWARE
public static final String OPTION_VALIDATE
public static final String OPTION_INDEX
public static final String OPTION_XMLNS
public Object load(Engine engine, List args) throws 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.Exception
public TemplateNodeModel load(Engine engine, List args, Document preLoadedDoc) throws Exception
Exception
public static boolean isOptionName(String optionName)
public static Document loadXmlFile(Engine engine, File xmlFile, boolean namespaceAware, boolean validate) throws SAXException, IOException, ParserConfigurationException
public static Document loadXmlFile(Engine engine, File xmlFile, boolean namespaceAware, boolean xincludeAware, boolean validate) throws SAXException, IOException, ParserConfigurationException