|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dfki.util.xml.XML.DOM
Defines a programming interface for accessing XML structures represented in the document object model (DOM). The interface hides implementation specific details and allows for dynamic DOM implementation selection. Methods not depending on a particular DOM implementation are made static.
Inner Class Summary | |
static class |
XML.DOM.Exception
|
Constructor Summary | |
XML.DOM()
|
Method Summary | |
static org.w3c.dom.Element |
createCDATAElement(org.w3c.dom.Document ownerDocument,
java.lang.String elementName,
java.lang.String text)
Creates an element and a subsequent CDataSection. |
static org.w3c.dom.Element |
createTextElement(org.w3c.dom.Document ownerDocument,
java.lang.String elementName,
java.lang.String text)
Creates an element and a subsequent text node. |
static java.lang.String |
getText(org.w3c.dom.Node node)
Returns all text nodes concatenated. |
static void |
getText(org.w3c.dom.Node node,
java.lang.StringBuffer buffer)
Returns all text nodes concatenated. |
abstract org.w3c.dom.Document |
newDocument()
Creates a new document instance. |
static void |
print(org.w3c.dom.Document doc)
Prints the XML document to System.out . |
static void |
print(org.w3c.dom.Document doc,
java.io.OutputStream os)
Prints the XML document to the given output stream. |
static void |
print(org.w3c.dom.Document doc,
java.io.Writer writer)
Prints the XML document to the given writer. |
static void |
print(org.w3c.dom.Element elt)
Prints the XML element to System.out . |
static void |
print(org.w3c.dom.Element elt,
java.io.OutputStream os)
Prints the XML element to the given output stream. |
static void |
print(org.w3c.dom.Element elt,
java.io.Writer writer)
Prints the XML element to the given writer. |
abstract org.w3c.dom.Document |
readFromString(java.lang.String source)
|
abstract org.w3c.dom.Document |
readFromURI(java.lang.String fileName)
|
static java.lang.String |
toString(org.w3c.dom.Document doc)
Converts the given DOM structure into a string representation. |
static java.lang.String |
toString(org.w3c.dom.Element elt)
Converts the given element into a string representation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XML.DOM()
Method Detail |
public abstract org.w3c.dom.Document readFromURI(java.lang.String fileName) throws org.xml.sax.SAXException, java.io.IOException
public abstract org.w3c.dom.Document readFromString(java.lang.String source) throws org.xml.sax.SAXException, java.io.IOException
public abstract org.w3c.dom.Document newDocument()
public static org.w3c.dom.Element createTextElement(org.w3c.dom.Document ownerDocument, java.lang.String elementName, java.lang.String text)
public static org.w3c.dom.Element createCDATAElement(org.w3c.dom.Document ownerDocument, java.lang.String elementName, java.lang.String text)
public static void print(org.w3c.dom.Document doc, java.io.OutputStream os) throws org.xml.sax.SAXException, java.io.IOException
public static void print(org.w3c.dom.Document doc, java.io.Writer writer) throws org.xml.sax.SAXException, java.io.IOException
public static void print(org.w3c.dom.Document doc) throws org.xml.sax.SAXException, java.io.IOException
System.out
.public static java.lang.String toString(org.w3c.dom.Document doc)
DOM
structure into a string representation.null
in the case of a failure.public static void print(org.w3c.dom.Element elt, java.io.OutputStream os) throws org.xml.sax.SAXException, java.io.IOException
public static void print(org.w3c.dom.Element elt, java.io.Writer writer) throws org.xml.sax.SAXException, java.io.IOException
public static void print(org.w3c.dom.Element elt) throws org.xml.sax.SAXException, java.io.IOException
System.out
.public static java.lang.String toString(org.w3c.dom.Element elt)
null
in the case of a failure.public static java.lang.String getText(org.w3c.dom.Node node)
public static void getText(org.w3c.dom.Node node, java.lang.StringBuffer buffer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |