public class EcmsdkXMLHelper extends Object
Constructor and Description |
---|
EcmsdkXMLHelper() |
Modifier and Type | Method and Description |
---|---|
static Document |
createDOM(File file,
boolean validate,
boolean ignoringWhitespace)
Wrapper for createDocument from file
|
static Document |
createDOM(File file,
boolean validate,
boolean ignoringWhitespace,
Locale locale,
String characterEncoding)
Creates the DOM object from a Reader, using the Oracle DOM Parser.
|
static Document |
createDOM(InputStream stream,
boolean validate,
boolean ignoringWhitespace)
Wrapper mthod for create document
|
static Document |
createDOM(InputStream stream,
boolean validate,
boolean ignoringWhitespace,
Locale locale,
String characterEncoding)
Creates the DOM object from an InputStream, using the Oracle DOM Parser.
|
static Document |
createDOM(Reader reader,
boolean validate,
boolean ignoringWhitespace) |
static Document |
createDOM(Reader reader,
boolean validate,
boolean ignoringWhitespace,
Locale locale,
String characterEncoding)
Creates the DOM object from a Reader, using the Oracle DOM Parser.
|
static Document |
createEmptyDocument()
Create empty document
|
static Document |
createXMLDocument(InputStream input,
boolean validating,
boolean ignoringWhitespace)
Create XML Document
|
static DocumentBuilderFactory |
getNewDocumentBuilderFactory(boolean validate)
Get new DocumentBuilderFactory
setXIncludeAware, setExpandEntityReferences and setIgnoringElementContentWhitespace are automatically set to false
|
static String |
innerXml(Node node)
Print inner node to text
|
static ByteArrayOutputStream |
printXMLDocument(Document document,
String encoding)
print xml document
|
static void |
validateName(String nameToValidate)
validate name
|
public static DocumentBuilderFactory getNewDocumentBuilderFactory(boolean validate)
validate
- : if true, the document is validatedpublic static Document createEmptyDocument() throws IfsException
IOCException
IfsException
public static Document createXMLDocument(InputStream input, boolean validating, boolean ignoringWhitespace) throws IfsException
input
- Input streamvalidating
- validateignoringWhitespace
- ignore the white spaceIfsException
public static Document createDOM(InputStream stream, boolean validate, boolean ignoringWhitespace, Locale locale, String characterEncoding) throws IfsException
stream
- the InputStream representing the XML documentvalidate
- boolean indicating whether the DOM parser should be
used in validating or non-validating modeIfsException
- thrown if the operation failspublic static Document createDOM(InputStream stream, boolean validate, boolean ignoringWhitespace) throws IfsException
stream
- validate
- ignoringWhitespace
- IfsException
public static Document createDOM(Reader reader, boolean validate, boolean ignoringWhitespace, Locale locale, String characterEncoding) throws IfsException
reader
- the Reader representing the XML documentvalidate
- boolean indicating whether the DOM parser should be
used in validating or non-validating modeIfsException
- thrown if the operation failspublic static Document createDOM(Reader reader, boolean validate, boolean ignoringWhitespace) throws IfsException
IfsException
public static Document createDOM(File file, boolean validate, boolean ignoringWhitespace, Locale locale, String characterEncoding) throws IfsException
reader
- the Reader representing the XML documentvalidate
- boolean indicating whether the DOM parser should be
used in validating or non-validating modeIfsException
- thrown if the operation failspublic static Document createDOM(File file, boolean validate, boolean ignoringWhitespace) throws IfsException
file
- validate
- ignoringWhitespace
- IfsException
public static String innerXml(Node node)
node
- public static void validateName(String nameToValidate) throws DOMException
nameToValidate
- DOMException
public static ByteArrayOutputStream printXMLDocument(Document document, String encoding) throws IfsException
document
- IfsException
Copyright © 2023. All rights reserved.