XMLDocument (original) (raw)

Modifier and Type

Method and Description

void

[clear](../../../weka/core/xml/XMLDocument.html#clear--)()

sets up an empty DOM document, with the current DOCTYPE and root node.

java.lang.Boolean

[evalBoolean](../../../weka/core/xml/XMLDocument.html#evalBoolean-java.lang.String-)(java.lang.String xpath)

Evaluates and returns the boolean result of the XPath expression.

java.lang.Double

[evalDouble](../../../weka/core/xml/XMLDocument.html#evalDouble-java.lang.String-)(java.lang.String xpath)

Evaluates and returns the double result of the XPath expression.

java.lang.String

[evalString](../../../weka/core/xml/XMLDocument.html#evalString-java.lang.String-)(java.lang.String xpath)

Evaluates and returns the boolean result of the XPath expression.

org.w3c.dom.NodeList

[findNodes](../../../weka/core/xml/XMLDocument.html#findNodes-java.lang.String-)(java.lang.String xpath)

Returns the nodes that the given xpath expression will find in the document.

javax.xml.parsers.DocumentBuilder

[getBuilder](../../../weka/core/xml/XMLDocument.html#getBuilder--)()

returns the DocumentBuilder.

static java.util.Vector

[getChildTags](../../../weka/core/xml/XMLDocument.html#getChildTags-org.w3c.dom.Node-)(org.w3c.dom.Node parent)

returns all non tag-children from the given node.

static java.util.Vector

[getChildTags](../../../weka/core/xml/XMLDocument.html#getChildTags-org.w3c.dom.Node-java.lang.String-)(org.w3c.dom.Node parent, java.lang.String name)

returns all non tag-children from the given node.

static java.lang.String

[getContent](../../../weka/core/xml/XMLDocument.html#getContent-org.w3c.dom.Element-)(org.w3c.dom.Element node)

returns the text between the opening and closing tag of a node (performs a trim() on the result).

java.lang.String

[getDocType](../../../weka/core/xml/XMLDocument.html#getDocType--)()

returns the current DOCTYPE, can be null.

org.w3c.dom.Document

[getDocument](../../../weka/core/xml/XMLDocument.html#getDocument--)()

returns the parsed DOM document.

javax.xml.parsers.DocumentBuilderFactory

[getFactory](../../../weka/core/xml/XMLDocument.html#getFactory--)()

returns the DocumentBuilderFactory.

org.w3c.dom.Node

[getNode](../../../weka/core/xml/XMLDocument.html#getNode-java.lang.String-)(java.lang.String xpath)

Returns the node represented by the XPath expression.

java.lang.String

[getRevision](../../../weka/core/xml/XMLDocument.html#getRevision--)()

Returns the revision string.

java.lang.String

[getRootNode](../../../weka/core/xml/XMLDocument.html#getRootNode--)()

returns the current root node.

boolean

[getValidating](../../../weka/core/xml/XMLDocument.html#getValidating--)()

returns whether a validating parser is used.

static void

[main](../../../weka/core/xml/XMLDocument.html#main-java.lang.String:A-)(java.lang.String[] args)

for testing only.

org.w3c.dom.Document

[newDocument](../../../weka/core/xml/XMLDocument.html#newDocument-java.lang.String-java.lang.String-)(java.lang.String docType, java.lang.String rootNode)

creates a new Document with the given information.

void

[print](../../../weka/core/xml/XMLDocument.html#print--)()

prints the current DOM document to standard out.

org.w3c.dom.Document

[read](../../../weka/core/xml/XMLDocument.html#read-java.io.File-)(java.io.File file)

parses the given file and returns a DOM document.

org.w3c.dom.Document

[read](../../../weka/core/xml/XMLDocument.html#read-java.io.InputStream-)(java.io.InputStream stream)

parses the given stream and returns a DOM document.

org.w3c.dom.Document

[read](../../../weka/core/xml/XMLDocument.html#read-java.io.Reader-)(java.io.Reader reader)

parses the given reader and returns a DOM document.

org.w3c.dom.Document

[read](../../../weka/core/xml/XMLDocument.html#read-java.lang.String-)(java.lang.String xml)

parses the given XML string (can be XML or a filename) and returns a DOM Document.

void

[setDocType](../../../weka/core/xml/XMLDocument.html#setDocType-java.lang.String-)(java.lang.String docType)

sets the DOCTYPE-String to use in the XML output.

void

[setDocument](../../../weka/core/xml/XMLDocument.html#setDocument-org.w3c.dom.Document-)(org.w3c.dom.Document newDocument)

sets the DOM document to use.

void

[setRootNode](../../../weka/core/xml/XMLDocument.html#setRootNode-java.lang.String-)(java.lang.String rootNode)

sets the root node to use in the XML output.

void

[setValidating](../../../weka/core/xml/XMLDocument.html#setValidating-boolean-)(boolean validating)

sets whether to use a validating parser or not.
Note: this does clear the current DOM document!

java.lang.String

[toString](../../../weka/core/xml/XMLDocument.html#toString--)()

returns the current DOM document as XML-string.

void

[write](../../../weka/core/xml/XMLDocument.html#write-java.io.File-)(java.io.File file)

writes the current DOM document into the given file.

void

[write](../../../weka/core/xml/XMLDocument.html#write-java.io.OutputStream-)(java.io.OutputStream stream)

writes the current DOM document into the given stream.

void

[write](../../../weka/core/xml/XMLDocument.html#write-java.lang.String-)(java.lang.String file)

writes the current DOM document into the given file.

void

[write](../../../weka/core/xml/XMLDocument.html#write-java.io.Writer-)(java.io.Writer writer)

writes the current DOM document into the given writer.