|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.tool.assessment.qti.util.XmlUtil
public final class XmlUtil
Copyright: Copyright (c) 2005
Organization: Sakai Project
| Constructor Summary | |
|---|---|
XmlUtil()
|
|
| Method Summary | |
|---|---|
static String |
convertStrforCDATA(String myString)
|
static Document |
createDocument()
Create document object |
static Document |
createDocument(String xmlString)
Create document object from XML string |
static Transformer |
createTransformer(Document stylesheet)
Create a transformer from a stylesheet |
static Transformer |
createTransformer(DOMSource source)
Create a transformer from a stylesheet |
static DOMSource |
getDocumentSource(javax.servlet.ServletContext context,
String path)
|
static String |
getDOMString(Node node)
Get a textual representation of a Node. |
static String |
processFormattedText(org.apache.commons.logging.Log log,
String value)
|
static Document |
readDocument(javax.servlet.ServletContext context,
String path)
Read document from ServletContext/context path |
static Document |
readDocument(String path)
Read document from within spring context path |
static Document |
readDocument(String path,
boolean trim)
This more forgiving version skips blank lines if trim = true Otherwise it does a direct parse of the file. |
static Document |
transformDocument(Document document,
Document stylesheet)
Transform one document into another |
static Document |
transformDocument(Document document,
Transformer transformer)
|
static void |
transformNode(Node source,
Node result,
Transformer transformer)
|
| 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 createDocument()
public static Document createDocument(String xmlString)
public static Document readDocument(javax.servlet.ServletContext context,
String path)
context - ServletContextpath - path
public static Document readDocument(String path)
path - path
public static DOMSource getDocumentSource(javax.servlet.ServletContext context,
String path)
public static Document readDocument(String path,
boolean trim)
throws ParserConfigurationException,
SAXException,
IOException
path - file pathtrim - trim blank lines true/false
ParserConfigurationException
SAXException
IOExceptionpublic static Transformer createTransformer(Document stylesheet)
stylesheet - Document
public static Transformer createTransformer(DOMSource source)
source - DOMSource
public static Document transformDocument(Document document,
Document stylesheet)
document - source Documentstylesheet - XSLT Document
public static Document transformDocument(Document document,
Transformer transformer)
public static void transformNode(Node source,
Node result,
Transformer transformer)
public static String getDOMString(Node node)
node - The Node
public static String processFormattedText(org.apache.commons.logging.Log log,
String value)
public static String convertStrforCDATA(String myString)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||