|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.app.webui.util.XMLUtil
public class XMLUtil
This class provides a set of static methods to load and transform XML documents. It supports parameter-aware stylesheets (XSLT).
| Constructor Summary | |
|---|---|
XMLUtil()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLUtil()
| Method Detail |
|---|
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 loaded
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
public 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 stylesheet
java.lang.Exception
public 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 stylesheet
java.lang.Exception
public 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 stylesheet
java.lang.Exception
public 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 stylesheet
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||