public interface XMLHelper
| Modifier and Type | Field and Description |
|---|---|
static XMLHelper |
INSTANCE
The default XMLHelper.
|
| Modifier and Type | Method and Description |
|---|---|
XMLDocument |
createDocument(DataObject dataObject,
String rootElementURI,
String rootElementName)
Creates an XMLDocument with the specified XML rootElement for the DataObject.
|
XMLDocument |
load(InputStream inputStream)
Creates and returns an XMLDocument from the inputStream.
|
XMLDocument |
load(InputStream inputStream,
String locationURI,
Object options)
Creates and returns an XMLDocument from the inputStream.
|
XMLDocument |
load(Reader inputReader,
String locationURI,
Object options)
Creates and returns an XMLDocument from the inputReader.
|
XMLDocument |
load(Source inputSource,
String locationURI,
Object options)
Creates and returns an XMLDocument from the inputSource.
|
XMLDocument |
load(String inputString)
Creates and returns an XMLDocument from the input String.
|
String |
save(DataObject dataObject,
String rootElementURI,
String rootElementName)
Returns the DataObject saved as an XML document with the specified root element.
|
void |
save(DataObject dataObject,
String rootElementURI,
String rootElementName,
OutputStream outputStream)
Saves the DataObject as an XML document with the specified root element.
|
void |
save(XMLDocument xmlDocument,
OutputStream outputStream,
Object options)
Serializes an XMLDocument as an XML document into the outputStream.
|
void |
save(XMLDocument xmlDocument,
Result outputResult,
Object options)
Serializes an XMLDocument as an XML document into the outputResult in a
serialization technology independent format (as specified in
javax.xml.transform).
|
void |
save(XMLDocument xmlDocument,
Writer outputWriter,
Object options)
Serializes an XMLDocument as an XML document into the outputWriter.
|
static final XMLHelper INSTANCE
XMLDocument load(String inputString)
inputString - specifies the String to read fromRuntimeException - for errors in XML parsing or
implementation-specific validation.XMLDocument load(InputStream inputStream) throws IOException
inputStream - specifies the InputStream to read fromIOException - for stream exceptions.RuntimeException - for errors in XML parsing or
implementation-specific validation.XMLDocument load(InputStream inputStream, String locationURI, Object options) throws IOException
inputStream - specifies the InputStream to read fromlocationURI - specifies the URI of the document for relative schema locationsoptions - implementation-specific options.IOException - for stream exceptions.RuntimeException - for errors in XML parsing or
implementation-specific validation.XMLDocument load(Reader inputReader, String locationURI, Object options) throws IOException
inputReader - specifies the Reader to read fromlocationURI - specifies the URI of the document for relative schema locationsoptions - implementation-specific options.IOException - for stream exceptions.RuntimeException - for errors in XML parsing or
implementation-specific validation.XMLDocument load(Source inputSource, String locationURI, Object options) throws IOException
inputSource - specifies the Source to read fromlocationURI - specifies the URI of the document for relative schema locationsoptions - implementation-specific options.IOException - for stream exceptions.RuntimeException - for errors in XML parsing or
implementation-specific validation.String save(DataObject dataObject, String rootElementURI, String rootElementName)
dataObject - specifies DataObject to be savedrootElementURI - the Target Namespace URI of the root XML elementrootElementName - the Name of the root XML elementIllegalArgumentException - if the dataObject tree
is not closed or has no container.void save(DataObject dataObject, String rootElementURI, String rootElementName, OutputStream outputStream) throws IOException
dataObject - specifies DataObject to be savedrootElementURI - the Target Namespace URI of the root XML elementrootElementName - the Name of the root XML elementoutputStream - specifies the OutputStream to write to.IOException - for stream exceptions.IllegalArgumentException - if the dataObject tree
is not closed or has no container.void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException
xmlDocument - specifies XMLDocument to be savedoutputStream - specifies the OutputStream to write to.options - implementation-specific options.IOException - for stream exceptions.IllegalArgumentException - if the dataObject tree
is not closed or has no container.void save(XMLDocument xmlDocument, Writer outputWriter, Object options) throws IOException
xmlDocument - specifies XMLDocument to be savedoutputWriter - specifies the Writer to write to.options - implementation-specific options.IOException - for stream exceptions.IllegalArgumentException - if the dataObject tree
is not closed or has no container.void save(XMLDocument xmlDocument, Result outputResult, Object options) throws IOException
xmlDocument - specifies XMLDocument to be savedoutputResult - specifies Result to be savedoptions - implementation-specific options.IOException - for stream exceptions.IllegalArgumentException - if the dataObject tree
is not closed or has no container.XMLDocument createDocument(DataObject dataObject, String rootElementURI, String rootElementName)
dataObject - specifies DataObject to be savedrootElementURI - the Target Namespace URI of the root XML elementrootElementName - the Name of the root XML elementCopyright © 2017. All rights reserved.