public class DefaultXMLFactoriesConfig extends Object implements XMLFactoriesConfig
XBProjector
which uses Java default factories to create
Transformer
DocumentBuilder
and XPath
. You may want to inherit from this
class to change this behavior.Modifier and Type | Class and Description |
---|---|
static class |
DefaultXMLFactoriesConfig.NamespacePhilosophy
This configuration can use one of three different ways to configure namespace handling.
|
static interface |
DefaultXMLFactoriesConfig.NSMapping
A facade to provide user defined namespace mappings.
|
Constructor and Description |
---|
DefaultXMLFactoriesConfig()
Empty default constructor, a Configuration has no state.
|
public DefaultXMLFactoriesConfig()
public DocumentBuilder createDocumentBuilder()
DocumentBuilder
.createDocumentBuilder
in interface XMLFactoriesConfig
public DocumentBuilderFactory createDocumentBuilderFactory()
DocumentBuilderFactory
.createDocumentBuilderFactory
in interface XMLFactoriesConfig
public DefaultXMLFactoriesConfig.NSMapping createNameSpaceMapping()
public Transformer createTransformer(Document... document)
Transformer
. Creation and
configuration may depend on the content of a document.createTransformer
in interface XMLFactoriesConfig
document
- (optional)public TransformerFactory createTransformerFactory()
TransformerFactory
.createTransformerFactory
in interface XMLFactoriesConfig
public XPath createXPath(Document... document)
XPath
. Creation and configuration may
depend on the content of a document. This may happen when you want to use the namespace
mapping of the document in your xpath expresssions.createXPath
in interface XMLFactoriesConfig
document
- (optional)public XPathFactory createXPathFactory()
XPathFactory
.createXPathFactory
in interface XMLFactoriesConfig
public DefaultXMLFactoriesConfig.NamespacePhilosophy getNamespacePhilosophy()
public Map<String,String> getUserDefinedNamespaceMapping()
XMLFactoriesConfig
getUserDefinedNamespaceMapping
in interface XMLFactoriesConfig
public boolean isExpandEntityReferences()
public boolean isNoEntityResolving()
public boolean isOmitXMLDeclaration()
public boolean isPrettyPrinting()
public boolean isXIncludeAware()
public void setExpandEntityReferences(boolean isExpandEntityReferences)
isExpandEntityReferences
- the isExpandEntityReferences to setpublic XMLFactoriesConfig setNamespacePhilosophy(DefaultXMLFactoriesConfig.NamespacePhilosophy namespacePhilosophy)
namespacePhilosophy
- public void setNoEntityResolving(boolean isNoEntityResolving)
isNoEntityResolving
- the isNoEntityResolving to setpublic DefaultXMLFactoriesConfig setOmitXMLDeclaration(boolean isOmitXMLDeclaration)
isOmitXMLDeclaration
- the isOmitXMLDeclaration to setpublic DefaultXMLFactoriesConfig setPrettyPrinting(boolean on)
on
- (true == output will be formatted)public void setXIncludeAware(boolean isXIncludeAware)
isXIncludeAware
- the isXIncludeAware to setCopyright © 2012-12-21-2022. All Rights Reserved.