public class XMLUtil
extends java.lang.Object
| Constructor and Description |
|---|
XMLUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.w3c.dom.Document |
loadXML(java.lang.String filename)
Loads a W3C XML document from a file.
|
static org.w3c.dom.Document |
transformDocument(org.w3c.dom.Document xmlDocument,
java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String xsltFilename)
Applies a stylesheet (that receives parameters) to a given xml document.
|
static org.w3c.dom.Document |
transformDocument(org.w3c.dom.Document xmlDocument,
java.lang.String xsltFilename)
Applies a stylesheet to a given xml document.
|
static java.lang.String |
transformDocumentAsString(org.w3c.dom.Document xmlDocument,
java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String xsltFilename)
Applies a stylesheet (that receives parameters) to a given xml document.
|
static java.lang.String |
transformDocumentAsString(org.w3c.dom.Document xmlDocument,
java.lang.String xsltFilename)
Applies a stylesheet to a given xml document.
|
public static org.w3c.dom.Document loadXML(java.lang.String filename)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
filename - The name of the file to be loadedjava.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic static org.w3c.dom.Document transformDocument(org.w3c.dom.Document xmlDocument,
java.lang.String xsltFilename)
throws java.lang.Exception
xmlDocument - the xml document to be transformedxsltFilename - the filename of the stylesheetjava.lang.Exceptionpublic static org.w3c.dom.Document transformDocument(org.w3c.dom.Document xmlDocument,
java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String xsltFilename)
throws java.lang.Exception
xmlDocument - the xml document to be transformedparameters - the hashtable with the parameters to be passed to the
stylesheetxsltFilename - the filename of the stylesheetjava.lang.Exceptionpublic static java.lang.String transformDocumentAsString(org.w3c.dom.Document xmlDocument,
java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String xsltFilename)
throws java.lang.Exception
xmlDocument - the xml document to be transformedparameters - the hashtable with the parameters to be passed to the
stylesheetxsltFilename - the filename of the stylesheetjava.lang.Exceptionpublic static java.lang.String transformDocumentAsString(org.w3c.dom.Document xmlDocument,
java.lang.String xsltFilename)
throws java.lang.Exception
xmlDocument - the xml document to be transformedxsltFilename - the filename of the stylesheetjava.lang.ExceptionCopyright © 2018 DuraSpace. All Rights Reserved.