|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectavignon.xml.XMLDocumentFactory
Helper class for making org.w3c.dom.Document objects out of strings and vice versa. Also provides methods for getting the text of a node.
| Method Summary | |
org.w3c.dom.Document |
buildDocument(java.lang.String xmlText)
Returns an org.w3c.dom.Document representing the given text. |
static XMLDocumentFactory |
getInstance()
|
java.io.InputStream |
getMockInputStream()
|
java.lang.String |
getNodeText(org.w3c.dom.Node root,
java.lang.String tag)
Finds an element based on the given XPath expression and returns the text of the first child. |
java.lang.String |
getXMLText(org.w3c.dom.Node node)
Returns the text of the node and all its children. |
void |
outputDocument(org.w3c.dom.Document document,
java.io.Writer output)
Writes the text of the document to the output after having closed any input, link or meta tags. |
void |
setMockInputStream(java.io.InputStream aMockInputStream)
|
javax.xml.transform.dom.DOMResult |
transform(org.w3c.dom.Document input,
java.lang.String transformer)
Transforms the input document by the XSL stored in transformer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static XMLDocumentFactory getInstance()
public org.w3c.dom.Document buildDocument(java.lang.String xmlText)
xmlText - Well formed XML text.
public java.lang.String getNodeText(org.w3c.dom.Node root,
java.lang.String tag)
root - Position at which to start the search.tag - An XPath expression describing where to find the node. (Note that this method always starts from the root node and searches all children.)
public java.lang.String getXMLText(org.w3c.dom.Node node)
node - Node to convert to text.
public void outputDocument(org.w3c.dom.Document document,
java.io.Writer output)
document - Document to output.output - Destination for the output.
public javax.xml.transform.dom.DOMResult transform(org.w3c.dom.Document input,
java.lang.String transformer)
input - Document to be transformed.transformer - Text of a valid XSL stylesheet.
public java.io.InputStream getMockInputStream()
public void setMockInputStream(java.io.InputStream aMockInputStream)
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||