|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectglobal.sandbox.xmlutilities.XmlUtilities
public class XmlUtilities
This class provides simple XML utilities.
Field Summary | |
---|---|
private NamespaceContext |
defaultNamespaceContext
Stores the default NamespaceContext. |
private DocumentBuilder |
documentBuilder
Stores document builder. |
private DocumentBuilderFactory |
documentBuilderFactory
Stores document builder factory. |
private static Logger |
LOGGER
Internal logger. |
private SchemaFactory |
schemaFactory
Stores schema factory. |
private Transformer |
transformer
Stores localTransformer. |
private TransformerFactory |
transformerFactory
Stores localTransformer factory. |
(package private) static String |
XMLUTILITIES_LOGGER_NAME
Name of internal logger. |
private XPath |
xpath
Stores XPath evaluator. |
private XPathFactory |
xpathFactory
Stores XPath factory. |
Constructor Summary | |
---|---|
XmlUtilities()
Initializes XML Utilities. |
|
XmlUtilities(DocumentBuilderFactory documentBuilderFactory,
DocumentBuilder documentBuilder,
SchemaFactory schemaFactory,
TransformerFactory transformerFactory,
Transformer transformer,
XPathFactory xpathFactory,
XPath xpath,
NamespaceContext defaultNamespaceContext)
Initializes XML Utilities. |
Method Summary | ||
---|---|---|
static void |
disableLogging()
Disables logging of XmlTools and XmlUtilities . |
|
(package private) static void |
disableLogging0()
Disables logging. |
|
String |
documentToString(Document source)
Converts XML Document into String. |
|
String |
documentToString(Document source,
OutputFormat outputFormat)
Converts XML Document into String. |
|
String |
documentToString(Document source,
Properties outputProperties)
Converts XML Document into String. |
|
NodeList |
evaluateXPath(String query,
Node context)
Evaluates specified XPath expression on specified context node. |
|
|
evaluateXPath(String query,
Node context,
Class<E> elementType)
Evaluates specified XPath expression on specified context node and returns results as NodeListCollection of specified element types. |
|
NodeList |
evaluateXPath(String query,
Node context,
NamespaceContext namespaces)
Evaluates specified XPath expression on specified context node. |
|
|
evaluateXPath(String query,
Node context,
NamespaceContext namespaces,
Class<E> elementType)
Evaluates specified XPath expression on specified context node and returns results as NodeListCollection of specified element types. |
|
NamespaceContext |
getDefaultNamespaceContext()
Returns default NamespaceContext used by the XML Utilities. |
|
DocumentBuilder |
getDocumentBuilder()
Returns DocumentBuilder object internally used by the XML Utilities. |
|
DocumentBuilderFactory |
getDocumentBuilderFactory()
Returns DocumentBuilderFactory object internally used by the XML Utilities. |
|
Node |
getFirstNodeForXPath(String query,
Node context)
Evaluates specified XPath expression and returns first Node if XPath has matches. |
|
|
getFirstNodeForXPath(String query,
Node context,
Class<E> elementType)
Evaluates specified XPath expression and returns first Node as specified element type if XPath has matches. |
|
Node |
getFirstNodeForXPath(String query,
Node context,
NamespaceContext namespaces)
Evaluates specified XPath expression and returns first Node if XPath has matches. |
|
|
getFirstNodeForXPath(String query,
Node context,
NamespaceContext namespaces,
Class<E> elementType)
Evaluates specified XPath expression and returns first Node as specified element type if XPath has matches. |
|
SchemaFactory |
getSchemaFactory()
Returns SchemaFactory object internally used by the XML Utilities. |
|
Transformer |
getTransformer()
Returns Transformer object internally used by the XML Utilities. |
|
TransformerFactory |
getTransformerFactory()
Returns TransformerFactory object internally used by the XML Utilities. |
|
XPath |
getXPath()
Returns XPath object internally used by the XML Utilities. |
|
XPathFactory |
getXPathFactory()
Returns XPathFactory object internally used by the XML Utilities. |
|
Document |
loadDocumentFromClassLoader(String resource,
Class<?> fallbackClazz)
Loads document from ClassLoaders. |
|
Document |
loadDocumentFromClassLoader(String resource,
DocumentBuilder documentBuilder,
Class<?> fallbackClazz)
Loads document from ClassLoaders. |
|
Document |
loadDocumentFromFile(File file)
Loads XML from file specified with the File object. |
|
Document |
loadDocumentFromFile(File file,
DocumentBuilder documentBuilder)
Loads XML from file specified with the file object. |
|
Document |
loadDocumentFromFile(String fileName)
Loads XML from file specified with file name. |
|
Document |
loadDocumentFromFile(String fileName,
DocumentBuilder documentBuilder)
Loads XML from file specified with file name. |
|
Document |
loadDocumentFromResource(String resource,
Class<?> clazz)
Loads Document from resource from given class. |
|
Document |
loadDocumentFromResource(String resource,
ClassLoader classLoader)
Loads document from resource using specified ClassLoader. |
|
Document |
loadDocumentFromResource(String resource,
DocumentBuilder documentBuilder,
Class<?> clazz)
Loads Document from resource from given class. |
|
Document |
loadDocumentFromResource(String resource,
DocumentBuilder documentBuilder,
ClassLoader classLoader)
Loads document from resource using specified ClassLoader. |
|
Document |
loadDocumentFromStream(InputStream is)
loads XML from specified input stream. |
|
Document |
loadDocumentFromStream(InputStream is,
DocumentBuilder documentBuilder)
Loads XML from specified input stream. |
|
Document |
loadDocumentFromStreamAndClose(InputStream is,
boolean close)
Loads XML from specified input stream and closes it if specified. |
|
Document |
loadDocumentFromStreamAndClose(InputStream is,
DocumentBuilder documentBuilder,
boolean close)
Loads XML from specified input stream and closes it if specified. |
|
Document |
loadDocumentFromString(String source)
Loads document from String into the Document . |
|
Document |
loadDocumentFromString(String source,
DocumentBuilder documentBuilder)
Loads document from String into the Document . |
|
static void |
setLoggingLevel(Level newLevel)
Sets new logging level of XmlTools and XmlUtilities . |
|
(package private) static void |
setLoggingLevel0(Level newLevel)
Sets new logging level. |
|
String |
sourceToString(Source source)
Converts XML Source into String. |
|
String |
sourceToString(Source source,
OutputFormat outputFormat)
Converts XML Source into String. |
|
String |
sourceToString(Source source,
Properties outputProperties)
Converts XML Source into String. |
|
Document |
transformToDocument(Source xsltTemplate,
Source document)
Transforms specified XML document using specified XSLT template. |
|
Document |
transformToDocument(Source xsltTemplate,
Source document,
Map<String,Object> parameters)
Transforms specified XML document using specified XSLT template. |
|
Document |
transformToDocument(Templates xsltTemplate,
Source document)
Transforms specified XML document using XSLT (compiled) template. |
|
Document |
transformToDocument(Templates xsltTemplate,
Source document,
Map<String,Object> parameters)
Transforms specified XML using XSLT (compiled) template. |
|
String |
transformToString(Source xsltTemplate,
Source document)
Transforms specified XML document using specified XSLT template. |
|
String |
transformToString(Source xsltTemplate,
Source document,
Map<String,Object> parameters)
Transforms specified XML source using specified XSLT template. |
|
String |
transformToString(Templates xsltTemplate,
Source document)
Transforms specified XML source using specified XSLT (compiled) template. |
|
String |
transformToString(Templates xsltTemplate,
Source document,
Map<String,Object> parameters)
Transforms specified XML source using specified XSLT (compiled) template. |
|
String |
validateXmlUsingSchema(Source xmlDocument,
Source xmlSchema)
Validates XML Document against XML Schema. |
|
void |
writeDocumentToBufferedStreamAndClose(Document doc,
OutputStream os,
Integer bufferSize)
Writes Document to stream using internal buffer and closes the stream. |
|
void |
writeDocumentToBufferedStreamAndClose(Document doc,
OutputStream os,
Integer bufferSize,
OutputFormat outputFormat)
Writes Document to stream using internal buffer and closes the stream. |
|
void |
writeDocumentToBufferedStreamAndClose(Document doc,
OutputStream os,
Integer bufferSize,
Properties outputProperties)
Writes Document to stream using internal buffer and closes the stream. |
|
void |
writeDocumentToBufferedStreamAndClose(Document doc,
OutputStream os,
Integer bufferSize,
Transformer transformer)
Writes Document to stream using internal buffer and closes the stream. |
|
void |
writeDocumentToFile(Document doc,
File file)
Writes Document to specified file. |
|
void |
writeDocumentToFile(Document doc,
File file,
Integer bufferSize)
Writes Document to specified file using internal buffer. |
|
void |
writeDocumentToFile(Document doc,
File file,
Integer bufferSize,
OutputFormat outputFormat)
Writes Document to specified file using internal buffer. |
|
void |
writeDocumentToFile(Document doc,
File file,
Integer bufferSize,
Properties outputProperties)
Writes Document to specified file using internal buffer. |
|
void |
writeDocumentToFile(Document doc,
File file,
Integer bufferSize,
Transformer transformer)
Writes Document to specified file using internal buffer. |
|
void |
writeDocumentToFile(Document doc,
File file,
OutputFormat outputFormat)
Writes Document to specified file. |
|
void |
writeDocumentToFile(Document doc,
File file,
Properties outputProperties)
Writes Document to specified file. |
|
void |
writeDocumentToFile(Document doc,
File file,
Transformer transformer)
Writes Document to specified file. |
|
void |
writeDocumentToFile(Document doc,
String file)
Writes Document to specified file. |
|
void |
writeDocumentToFile(Document doc,
String file,
Integer bufferSize)
Writes Document to specified file using internal buffer. |
|
void |
writeDocumentToFile(Document doc,
String file,
Integer bufferSize,
OutputFormat outputFormat)
Writes Document to specified file using internal buffer. |
|
void |
writeDocumentToFile(Document doc,
String file,
Integer bufferSize,
Properties outputProperties)
Writes Document to specified file using internal buffer. |
|
void |
writeDocumentToFile(Document doc,
String file,
Integer bufferSize,
Transformer transformer)
Writes Document to specified file using internal buffer. |
|
void |
writeDocumentToFile(Document doc,
String file,
OutputFormat outputFormat)
Writes Document to specified file. |
|
void |
writeDocumentToFile(Document doc,
String file,
Properties outputProperties)
Writes Document to specified file. |
|
void |
writeDocumentToFile(Document doc,
String file,
Transformer transformer)
Writes Document to specified file. |
|
void |
writeDocumentToStream(Document doc,
OutputStream os)
Writes specified document into specified output stream. |
|
void |
writeDocumentToStream(Document doc,
OutputStream os,
OutputFormat outputFormat)
Writes specified document into specified stream and specified output format. |
|
void |
writeDocumentToStream(Document doc,
OutputStream os,
Properties outputProperties)
Writes specified document into specified stream and specified output format properties. |
|
void |
writeDocumentToStream(Document doc,
OutputStream os,
Transformer transformer)
Writes specified document into specified stream and specified Transformer . |
|
void |
writeDocumentToStreamAndClose(Document doc,
OutputStream os,
boolean close)
Writes specified document into specified output stream. |
|
void |
writeDocumentToStreamAndClose(Document doc,
OutputStream os,
boolean close,
OutputFormat outputFormat)
Writes specified document into specified stream and specified output format. |
|
void |
writeDocumentToStreamAndClose(Document doc,
OutputStream os,
boolean close,
Properties outputProperties)
Writes specified document into specified stream and specified output format properties. |
|
void |
writeDocumentToStreamAndClose(Document doc,
OutputStream os,
boolean close,
Transformer transformer)
Writes specified document into specified stream and specified Transformer . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final String XMLUTILITIES_LOGGER_NAME
private static final Logger LOGGER
private final SchemaFactory schemaFactory
private final DocumentBuilderFactory documentBuilderFactory
private final DocumentBuilder documentBuilder
private final TransformerFactory transformerFactory
private final Transformer transformer
private final XPathFactory xpathFactory
private final XPath xpath
private final NamespaceContext defaultNamespaceContext
Constructor Detail |
---|
public XmlUtilities() throws XmlUtilitiesException
XmlUtilitiesException
- on errorpublic XmlUtilities(DocumentBuilderFactory documentBuilderFactory, DocumentBuilder documentBuilder, SchemaFactory schemaFactory, TransformerFactory transformerFactory, Transformer transformer, XPathFactory xpathFactory, XPath xpath, NamespaceContext defaultNamespaceContext) throws XmlUtilitiesException
documentBuilderFactory
- custom DocumentBuilderFactorydocumentBuilder
- custom DocumentBuilderschemaFactory
- custom SchemaFactorytransformerFactory
- custom TransformerFactorytransformer
- custom TransformerxpathFactory
- custom XPathFactoryxpath
- custom XPathdefaultNamespaceContext
- custom name spaces
XmlUtilitiesException
- on errorMethod Detail |
---|
public SchemaFactory getSchemaFactory()
public DocumentBuilderFactory getDocumentBuilderFactory()
public DocumentBuilder getDocumentBuilder()
public TransformerFactory getTransformerFactory()
public Transformer getTransformer()
public XPathFactory getXPathFactory()
public XPath getXPath()
public NamespaceContext getDefaultNamespaceContext()
public String validateXmlUsingSchema(Source xmlDocument, Source xmlSchema) throws XmlUtilitiesException
xmlDocument
- document to validatexmlSchema
- XMLSchema
null
if successful, string with error otherwise
XmlUtilitiesException
- on errorpublic Document loadDocumentFromFile(String fileName) throws XmlUtilitiesException
fileName
- file to load
XmlUtilitiesException
- on errorpublic Document loadDocumentFromFile(String fileName, DocumentBuilder documentBuilder) throws XmlUtilitiesException
fileName
- file to loaddocumentBuilder
- custom document builder
XmlUtilitiesException
- on errorpublic Document loadDocumentFromFile(File file) throws XmlUtilitiesException
file
- file to load
XmlUtilitiesException
- on errorpublic Document loadDocumentFromFile(File file, DocumentBuilder documentBuilder) throws XmlUtilitiesException
file
- file to loaddocumentBuilder
- custom document builder
XmlUtilitiesException
- on errorpublic Document loadDocumentFromStream(InputStream is) throws XmlUtilitiesException
is
- input stream
XmlUtilitiesException
- on errorpublic Document loadDocumentFromStream(InputStream is, DocumentBuilder documentBuilder) throws XmlUtilitiesException
is
- input streamdocumentBuilder
- custom Document Builder
XmlUtilitiesException
- on errorpublic Document loadDocumentFromStreamAndClose(InputStream is, boolean close) throws XmlUtilitiesException
is
- input streamclose
- true
to close input stream, false
to leave it unclosed
XmlUtilitiesException
- on errorpublic Document loadDocumentFromStreamAndClose(InputStream is, DocumentBuilder documentBuilder, boolean close) throws XmlUtilitiesException
is
- input streamdocumentBuilder
- custom Document Builderclose
- true
to close input stream, false
to leave it unclosed
XmlUtilitiesException
- on errorpublic Document loadDocumentFromClassLoader(String resource, Class<?> fallbackClazz) throws XmlUtilitiesException
ContextClassLoader
, fallBackClazz#getClassLoader()
or SystemClassLoader
is used whichever is find first.
resource
- resource name to load fromfallbackClazz
- ClassLoader to use if ContextClassLoader
does not exist
XmlUtilitiesException
- on errorpublic Document loadDocumentFromClassLoader(String resource, DocumentBuilder documentBuilder, Class<?> fallbackClazz) throws XmlUtilitiesException
ContextClassLoader
, fallBackClazz#getClassLoader()
or SystemClassLoader
is used whichever is find first.
resource
- resource name to load fromdocumentBuilder
- custom DocumentBuilderfallbackClazz
- ClassLoader to use if ContextClassLoader
does not exist
XmlUtilitiesException
- on errorpublic Document loadDocumentFromResource(String resource, Class<?> clazz) throws XmlUtilitiesException
resource
- resource to loadclazz
- class to use
XmlUtilitiesException
- on errorpublic Document loadDocumentFromResource(String resource, DocumentBuilder documentBuilder, Class<?> clazz) throws XmlUtilitiesException
resource
- resource to loaddocumentBuilder
- custom DocumentBuilderclazz
- class to use
XmlUtilitiesException
- on errorpublic Document loadDocumentFromResource(String resource, ClassLoader classLoader) throws XmlUtilitiesException
resource
- resource to loadclassLoader
- ClassLoader to use
XmlUtilitiesException
- on errorpublic Document loadDocumentFromResource(String resource, DocumentBuilder documentBuilder, ClassLoader classLoader) throws XmlUtilitiesException
resource
- resource to loaddocumentBuilder
- custom DocumentBuilderclassLoader
- ClassLoader to use
XmlUtilitiesException
- on errorpublic Document loadDocumentFromString(String source) throws XmlUtilitiesException
Document
.
source
- source XML
XmlUtilitiesException
- on errorpublic Document loadDocumentFromString(String source, DocumentBuilder documentBuilder) throws XmlUtilitiesException
Document
.
source
- source XMLdocumentBuilder
- custom document builder
XmlUtilitiesException
- on errorpublic String documentToString(Document source) throws XmlUtilitiesException
source
- Document to convert
XmlUtilitiesException
- on errorpublic String documentToString(Document source, OutputFormat outputFormat) throws XmlUtilitiesException
source
- Document to convertoutputFormat
- output format configuration
XmlUtilitiesException
- on errorpublic String documentToString(Document source, Properties outputProperties) throws XmlUtilitiesException
source
- Document to convertoutputProperties
- output properties (see OutputFormat
)
XmlUtilitiesException
- on errorpublic String sourceToString(Source source) throws XmlUtilitiesException
source
- Document to convert
XmlUtilitiesException
- on errorpublic String sourceToString(Source source, OutputFormat outputFormat) throws XmlUtilitiesException
source
- Document to convertoutputFormat
- output format configuration
XmlUtilitiesException
- on errorpublic String sourceToString(Source source, Properties outputProperties) throws XmlUtilitiesException
source
- Document to convertoutputProperties
- output properties (see OutputFormat
)
XmlUtilitiesException
- on errorpublic NodeList evaluateXPath(String query, Node context) throws XmlUtilitiesException
query
- XPath expressioncontext
- context node
NodeList
or null
if no matches
XmlUtilitiesException
- on errorpublic NodeList evaluateXPath(String query, Node context, NamespaceContext namespaces) throws XmlUtilitiesException
query
- XPath expressioncontext
- context nodenamespaces
- name space context
NodeList
or null
if no matches
XmlUtilitiesException
- on errorpublic <E extends Node> NodeListCollection<E> evaluateXPath(String query, Node context, Class<E> elementType) throws XmlUtilitiesException
NodeListCollection
of specified element types. This method never returns null
.
E
- type of elementquery
- XPath expressioncontext
- context nodeelementType
- class type of element
NodeListCollection
of element type or empty list if no matches.
XmlUtilitiesException
- on errorpublic <E extends Node> NodeListCollection<E> evaluateXPath(String query, Node context, NamespaceContext namespaces, Class<E> elementType) throws XmlUtilitiesException
NodeListCollection
of specified element types. This method never returns null
.
E
- type of elementquery
- XPath expressioncontext
- context nodenamespaces
- name space contextelementType
- class type of element
NodeListCollection
of element type or empty list if no matches.
XmlUtilitiesException
- on errorpublic Node getFirstNodeForXPath(String query, Node context) throws XmlUtilitiesException
query
- XPath expressioncontext
- context node
null
XmlUtilitiesException
- on errorpublic Node getFirstNodeForXPath(String query, Node context, NamespaceContext namespaces) throws XmlUtilitiesException
query
- XPath expressioncontext
- context nodenamespaces
- name space context
null
XmlUtilitiesException
- on errorpublic <E extends Node> E getFirstNodeForXPath(String query, Node context, Class<E> elementType) throws XmlUtilitiesException
E
- type of elementquery
- XPath expressioncontext
- context nodeelementType
- class type of element
null
XmlUtilitiesException
- on errorpublic <E extends Node> E getFirstNodeForXPath(String query, Node context, NamespaceContext namespaces, Class<E> elementType) throws XmlUtilitiesException
E
- type of elementquery
- XPath expressioncontext
- context nodenamespaces
- name space contextelementType
- class type of element
null
XmlUtilitiesException
- on errorpublic String transformToString(Source xsltTemplate, Source document, Map<String,Object> parameters) throws XmlUtilitiesException
xsltTemplate
- template to usedocument
- source XML documentparameters
- parameters to propagate to the localTransformer
XmlUtilitiesException
- on errorpublic String transformToString(Templates xsltTemplate, Source document, Map<String,Object> parameters) throws XmlUtilitiesException
xsltTemplate
- template to usedocument
- source XML document to transformparameters
- parameters to propagate to the localTransformer
XmlUtilitiesException
- on errorpublic String transformToString(Templates xsltTemplate, Source document) throws XmlUtilitiesException
xsltTemplate
- template to usedocument
- source XML document to transform
XmlUtilitiesException
- on errorpublic String transformToString(Source xsltTemplate, Source document) throws XmlUtilitiesException
xsltTemplate
- XSLT templatedocument
- source XML document
XmlUtilitiesException
- on errorpublic Document transformToDocument(Source xsltTemplate, Source document) throws XmlUtilitiesException
xsltTemplate
- XSLT templatedocument
- source XML document
Document
XmlUtilitiesException
- on errorpublic Document transformToDocument(Templates xsltTemplate, Source document) throws XmlUtilitiesException
xsltTemplate
- template to usedocument
- document to transform
Document
XmlUtilitiesException
- on errorpublic Document transformToDocument(Source xsltTemplate, Source document, Map<String,Object> parameters) throws XmlUtilitiesException
xsltTemplate
- XSLT templatedocument
- source XML documentparameters
- parameters for the template
Document
XmlUtilitiesException
- on errorpublic Document transformToDocument(Templates xsltTemplate, Source document, Map<String,Object> parameters) throws XmlUtilitiesException
xsltTemplate
- template to usedocument
- XML document to transformparameters
- parameters for the transformation
Document
XmlUtilitiesException
- on errorpublic void writeDocumentToStream(Document doc, OutputStream os) throws XmlUtilitiesException
doc
- documentos
- output stream
XmlUtilitiesException
- on errorpublic void writeDocumentToStream(Document doc, OutputStream os, OutputFormat outputFormat) throws XmlUtilitiesException
doc
- documentos
- output streamoutputFormat
- output format
XmlUtilitiesException
- on errorpublic void writeDocumentToStream(Document doc, OutputStream os, Properties outputProperties) throws XmlUtilitiesException
doc
- documentos
- output streamoutputProperties
- output format properties
XmlUtilitiesException
- on errorpublic void writeDocumentToStream(Document doc, OutputStream os, Transformer transformer) throws XmlUtilitiesException
Transformer
.
doc
- documentos
- output streamtransformer
- Transformer to use
XmlUtilitiesException
- on errorpublic void writeDocumentToStreamAndClose(Document doc, OutputStream os, boolean close) throws XmlUtilitiesException
doc
- documentos
- output streamclose
- tells if stream should be closed
XmlUtilitiesException
- on errorpublic void writeDocumentToStreamAndClose(Document doc, OutputStream os, boolean close, OutputFormat outputFormat) throws XmlUtilitiesException
doc
- documentos
- output streamclose
- tells if stream should be closedoutputFormat
- output format
XmlUtilitiesException
- on errorpublic void writeDocumentToStreamAndClose(Document doc, OutputStream os, boolean close, Properties outputProperties) throws XmlUtilitiesException
doc
- documentos
- output streamclose
- tells if stream should be closedoutputProperties
- output format properties
XmlUtilitiesException
- on errorpublic void writeDocumentToStreamAndClose(Document doc, OutputStream os, boolean close, Transformer transformer) throws XmlUtilitiesException
Transformer
.
doc
- documentos
- output streamclose
- tells if stream should be closedtransformer
- Transformer to use
XmlUtilitiesException
- on errorpublic void writeDocumentToBufferedStreamAndClose(Document doc, OutputStream os, Integer bufferSize) throws XmlUtilitiesException
doc
- Document to writeos
- target streambufferSize
- specified buffer size, null
for default
XmlUtilitiesException
- on errorpublic void writeDocumentToBufferedStreamAndClose(Document doc, OutputStream os, Integer bufferSize, OutputFormat outputFormat) throws XmlUtilitiesException
doc
- Document to writeos
- target streambufferSize
- specified buffer size, null
for defaultoutputFormat
- output format
XmlUtilitiesException
- on errorpublic void writeDocumentToBufferedStreamAndClose(Document doc, OutputStream os, Integer bufferSize, Properties outputProperties) throws XmlUtilitiesException
doc
- Document to writeos
- target streambufferSize
- specified buffer size, null
for defaultoutputProperties
- output format properties
XmlUtilitiesException
- on errorpublic void writeDocumentToBufferedStreamAndClose(Document doc, OutputStream os, Integer bufferSize, Transformer transformer) throws XmlUtilitiesException
doc
- Document to writeos
- target streambufferSize
- specified buffer size, null
for defaulttransformer
- transformer
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, String file) throws XmlUtilitiesException
doc
- documentfile
- target file
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, String file, OutputFormat outputFormat) throws XmlUtilitiesException
doc
- documentfile
- target fileoutputFormat
- output format
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, String file, Properties outputProperties) throws XmlUtilitiesException
doc
- documentfile
- target fileoutputProperties
- output format properties
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, String file, Transformer transformer) throws XmlUtilitiesException
doc
- documentfile
- target filetransformer
- transformer
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, String file, Integer bufferSize) throws XmlUtilitiesException
doc
- documentfile
- target filebufferSize
- buffer size or null
for default
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, String file, Integer bufferSize, OutputFormat outputFormat) throws XmlUtilitiesException
doc
- documentfile
- target filebufferSize
- buffer size or null
for defaultoutputFormat
- output format
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, String file, Integer bufferSize, Properties outputProperties) throws XmlUtilitiesException
doc
- documentfile
- target filebufferSize
- buffer size or null
for defaultoutputProperties
- output format properties
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, String file, Integer bufferSize, Transformer transformer) throws XmlUtilitiesException
doc
- documentfile
- target filebufferSize
- buffer size or null
for defaulttransformer
- transformer
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, File file) throws XmlUtilitiesException
doc
- documentfile
- target file
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, File file, OutputFormat outputFormat) throws XmlUtilitiesException
doc
- documentfile
- target fileoutputFormat
- output format
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, File file, Properties outputProperties) throws XmlUtilitiesException
doc
- documentfile
- target fileoutputProperties
- output format properties
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, File file, Transformer transformer) throws XmlUtilitiesException
doc
- documentfile
- target filetransformer
- transformer
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, File file, Integer bufferSize) throws XmlUtilitiesException
doc
- documentfile
- target filebufferSize
- buffer size or null
for default
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, File file, Integer bufferSize, OutputFormat outputFormat) throws XmlUtilitiesException
doc
- documentfile
- target filebufferSize
- buffer size or null
for defaultoutputFormat
- output format
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, File file, Integer bufferSize, Properties outputProperties) throws XmlUtilitiesException
doc
- documentfile
- target filebufferSize
- buffer size or null
for defaultoutputProperties
- output format properties
XmlUtilitiesException
- on errorpublic void writeDocumentToFile(Document doc, File file, Integer bufferSize, Transformer transformer) throws XmlUtilitiesException
doc
- documentfile
- target filebufferSize
- buffer size or null
for defaulttransformer
- transformer
XmlUtilitiesException
- on errorpublic static void disableLogging()
XmlTools
and XmlUtilities
.
static void disableLogging0()
public static void setLoggingLevel(Level newLevel)
XmlTools
and XmlUtilities
.
newLevel
- level to setstatic void setLoggingLevel0(Level newLevel)
newLevel
- level to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |