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 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 boolean isPrettyPrinting()
public XMLFactoriesConfig setNamespacePhilosophy(DefaultXMLFactoriesConfig.NamespacePhilosophy namespacePhilosophy)
namespacePhilosophy
- public DefaultXMLFactoriesConfig setPrettyPrinting(boolean on)
on
- (true == output will be formatted)public boolean isOmitXMLDeclaration()
public DefaultXMLFactoriesConfig setOmitXMLDeclaration(boolean isOmitXMLDeclaration)
isOmitXMLDeclaration
- the isOmitXMLDeclaration to setpublic DefaultXMLFactoriesConfig.NSMapping createNameSpaceMapping()
public Map<String,String> getUserDefinedNamespaceMapping()
XMLFactoriesConfig
getUserDefinedNamespaceMapping
in interface XMLFactoriesConfig
Copyright © 2012-12-21-2017. All Rights Reserved.