|
||||||||||
| 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 Document |
loadXML(String filename)
Loads a W3C XML document from a file. |
static Document |
transformDocument(Document xmlDocument,
Map<String,String> parameters,
String xsltFilename)
Applies a stylesheet (that receives parameters) to a given xml document. |
static Document |
transformDocument(Document xmlDocument,
String xsltFilename)
Applies a stylesheet to a given xml document. |
static String |
transformDocumentAsString(Document xmlDocument,
Map<String,String> parameters,
String xsltFilename)
Applies a stylesheet (that receives parameters) to a given xml document. |
static String |
transformDocumentAsString(Document xmlDocument,
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 Document loadXML(String filename)
throws IOException,
ParserConfigurationException,
SAXException
filename - The name of the file to be loaded
IOException
ParserConfigurationException
SAXException
public static Document transformDocument(Document xmlDocument,
String xsltFilename)
throws Exception
xmlDocument - the xml document to be transformedxsltFilename - the filename of the stylesheet
Exception
public static Document transformDocument(Document xmlDocument,
Map<String,String> parameters,
String xsltFilename)
throws Exception
xmlDocument - the xml document to be transformedparameters - the hashtable with the parameters to be passed to the
stylesheetxsltFilename - the filename of the stylesheet
Exception
public static String transformDocumentAsString(Document xmlDocument,
Map<String,String> parameters,
String xsltFilename)
throws Exception
xmlDocument - the xml document to be transformedparameters - the hashtable with the parameters to be passed to the
stylesheetxsltFilename - the filename of the stylesheet
Exception
public static String transformDocumentAsString(Document xmlDocument,
String xsltFilename)
throws Exception
xmlDocument - the xml document to be transformedxsltFilename - the filename of the stylesheet
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||