|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvoicexml.xml.XmlDocument
public abstract class XmlDocument
An XML Document abstract base class.
VoiceXML is designed for creating audio dialogs that feature synthesized speech, digitized audio, regognition of spoken and DTMF key input, recording of spoken input, telephony and mixed initiative conversations. Its major goal is to bring the advantages of web-based development and content delivery to interactive voiceresponse applications.
Objects of this class can create such VoiceXML documents or parse them.
Copyright © 2005 JVoiceXML group - http://jvoicexml.sourceforge.net/
| Field Summary | |
|---|---|
protected Document |
document
The encapsulated document. |
| Constructor Summary | |
|---|---|
XmlDocument()
Create an empty XML document. |
|
XmlDocument(Document doc)
Construct a new XML document with the given document. |
|
XmlDocument(InputSource source)
Constructs a new XML document from the given input source. |
|
| Method Summary | |
|---|---|
Node |
adoptNode(Node source)
Attempts to adopt a node from another document to this document. |
Node |
appendChild(Node newChild)
Adds the node newChild to the end of the list of children
of this node. |
Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. |
short |
compareDocumentPosition(Node other)
Compares the reference node, i.e. |
Attr |
createAttribute(String name)
Creates an Attr of the given name. |
Attr |
createAttributeNS(String namespaceURI,
String qualifiedName)
Creates an attribute of the given qualified name and namespace URI. |
CDATASection |
createCDATASection(String data)
Creates a CDATASection node whose value is the specified
string. |
Comment |
createComment(String data)
Creates a Comment node given the specified string. |
DocumentFragment |
createDocumentFragment()
Creates an empty DocumentFragment object. |
Element |
createElement(String tagName)
Creates an element of the type specified. |
Element |
createElementNS(String namespaceURI,
String qualifiedName)
Creates an element of the given qualified name and namespace URI. |
EntityReference |
createEntityReference(String name)
Creates an EntityReference object. |
ProcessingInstruction |
createProcessingInstruction(String target,
String data)
Creates a ProcessingInstruction node given the specified
name and data strings. |
protected abstract Node |
createRootNode()
Create the root node of the document. |
Text |
createTextNode(String data)
Creates a Text node given the specified string. |
NamedNodeMap |
getAttributes()
A NamedNodeMap containing the attributes of this node (if
it is an Element) or null otherwise. |
String |
getBaseURI()
The absolute base URI of this node or null if the
implementation wasn't able to obtain an absolute URI. |
NodeList |
getChildNodes()
A NodeList that contains all children of this node. |
DocumentType |
getDoctype()
The Document Type Declaration (see DocumentType)
associated with this document. |
Element |
getDocumentElement()
This is a convenience attribute that allows direct access to the child node that is the root element of the document. |
String |
getDocumentURI()
The location of the document or null if undefined or if
the Document was created using
DOMImplementation.createDocument. |
DOMConfiguration |
getDomConfig()
The configuration used when Document.normalizeDocument()
is invoked. |
Element |
getElementById(String elementId)
Returns the Element whose ID is given by
elementId. |
NodeList |
getElementsByTagName(String tagname)
Returns a NodeList of all the Elements with
a given tag name in the order in which they are encountered in a preorder
traversal of the Document tree. |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
Returns a NodeList of all the Elements with
a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the Document tree. |
Object |
getFeature(String feature,
String version)
This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in . |
Node |
getFirstChild()
The first child of this node. |
DOMImplementation |
getImplementation()
The DOMImplementation object that handles this document. |
String |
getInputEncoding()
An attribute specifying the encoding used for this document at the time of the parsing. |
Node |
getLastChild()
The last child of this node. |
String |
getLocalName()
Returns the local part of the qualified name of this node. |
String |
getNamespaceURI()
The namespace URI of this node, or null if it is
unspecified. |
Node |
getNextSibling()
The node immediately following this node. |
String |
getNodeName()
The name of this node, depending on its type; see the table above. |
short |
getNodeType()
A code representing the type of the underlying object, as defined above. |
String |
getNodeValue()
The value of this node, depending on its type; see the table above. |
Document |
getOwnerDocument()
The Document object associated with this node. |
Node |
getParentNode()
The parent of this node. |
String |
getPrefix()
The namespace prefix of this node, or null if it is
unspecified. |
Node |
getPreviousSibling()
The node immediately preceding this node. |
private Node |
getRawNode(Node arg)
Get the raw node encapsulated by the specified node. |
boolean |
getStrictErrorChecking()
An attribute specifying whether error checking is enforced or not. |
String |
getTextContent()
This attribute returns the text content of this node and its descendants. |
Object |
getUserData(String key)
Retrieves the object associated to a key on a this node. |
String |
getXmlEncoding()
An attribute specifying, as part of the XML declaration, the encoding of this document. |
protected abstract Node |
getXmlNode(Node node)
Get the XmlNode object corresponding to the node. |
protected abstract NodeList |
getXmlNodeList(NodeList nodeList)
Get the XmlNodeList object corresponding to the nodelist. |
boolean |
getXmlStandalone()
An attribute specifying, as part of the XML declaration, whether this document is standalone. |
String |
getXmlVersion()
An attribute specifying, as part of the XML declaration, the version number of this document. |
boolean |
hasAttributes()
Returns whether this node (if it is an element) has any attributes. |
boolean |
hasChildNodes()
Returns whether this node has any children. |
Node |
importNode(Node importedNode,
boolean deep)
Imports a node from another document to this document. |
Node |
insertBefore(Node newChild,
Node refChild)
Inserts the node newChild before the existing child node
refChild. |
boolean |
isDefaultNamespace(String namespaceURI)
This method checks if the specified namespaceURI is the
default namespace or not. |
boolean |
isEqualNode(Node arg)
Tests whether two nodes are equal. |
boolean |
isSameNode(Node other)
Returns whether this node is the same node as the given one. |
boolean |
isSupported(String feature,
String version)
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node. |
String |
lookupNamespaceURI(String prefix)
Look up the namespace URI associated to the given prefix, starting from this node. |
String |
lookupPrefix(String namespaceURI)
Look up the prefix associated to the given namespace URI, starting from this node. |
void |
normalize()
Puts all Text nodes in the full depth of the sub-tree
underneath this Node, including attribute nodes, into a
"normal" form where only structure (e.g., elements, comments, processing
instructions, CDATA sections, and entity references) separates
Text nodes, i.e., there are neither adjacent
Text nodes nor empty Text nodes. |
void |
normalizeDocument()
This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form. |
Node |
removeChild(Node oldChild)
Removes the child node indicated by oldChild from the list
of children, and returns it. |
Node |
renameNode(Node n,
String namespaceURI,
String qualifiedName)
Rename an existing node of type ELEMENT_NODE or
ATTRIBUTE_NODE. |
Node |
replaceChild(Node newChild,
Node oldChild)
Replaces the child node oldChild with
newChild in the list of children, and returns the
oldChild node. |
void |
setDocumentURI(String documentURI)
The location of the document or null if undefined or if
the Document was created using
DOMImplementation.createDocument. |
void |
setNodeValue(String nodeValue)
The value of this node, depending on its type; see the table above. |
void |
setPrefix(String prefix)
The namespace prefix of this node, or null if it is
unspecified. |
void |
setStrictErrorChecking(boolean strictErrorChecking)
An attribute specifying whether error checking is enforced or not. |
void |
setTextContent(String textContent)
This attribute returns the text content of this node and its descendants. |
Object |
setUserData(String key,
Object data,
UserDataHandler handler)
Associate an object to a key on this node. |
void |
setXmlStandalone(boolean xmlStandalone)
An attribute specifying, as part of the XML declaration, whether this document is standalone. |
void |
setXmlVersion(String xmlVersion)
An attribute specifying, as part of the XML declaration, the version number of this document. |
String |
toString()
Creates a representation as an XML string. |
String |
toXml()
Returns the contents of this object as an XML formatted string. |
void |
writeChildrenXml(XmlWriter writer)
Used to write any children of a node. |
void |
writeXml(XmlWriter writer)
This is the primary method used to write an object and its children as XML text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Document document
| Constructor Detail |
|---|
public XmlDocument()
throws ParserConfigurationException
ParserConfigurationException - Error creating the document builder.
public XmlDocument(InputSource source)
throws ParserConfigurationException,
SAXException,
IOException
source - Input source for a single XML document.
ParserConfigurationException - Error creating the document builder.
SAXException - Error parsing the input source.
IOException - Error reading the input source.public XmlDocument(Document doc)
doc - Encapsulated document.| Method Detail |
|---|
protected abstract Node createRootNode()
public Node appendChild(Node newChild)
throws DOMException
newChild to the end of the list of children
of this node.
appendChild in interface NodenewChild - The node to add.If it is a DocumentFragment object,
the entire contents of the document fragment are moved into the
child list of this node
DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of
a type that does not allow children of the type of the
newChild node, or if the node to append is one of
this node's ancestors or this node itself. WRONG_DOCUMENT_ERR: Raised if
newChild was created from a different document
than the one that created this node.NO_MODIFICATION_ALLOWED_ERR: Raised if this node
is readonly or if the previous parent of the node being inserted
is readonly.public Node cloneNode(boolean deep)
cloneNode in interface Nodedeep - If true, recursively clone the subtree under the
specified node; if false, clone only the node
itself (and its attributes, if it is an Element).
public Attr createAttribute(String name)
throws DOMException
Attr of the given name.
createAttribute in interface Documentname - The name of the attribute.
Attr object with the nodeName
attribute set to name, and localName,
prefix, and namespaceURI set to
null. The value of the attribute is the empty
string.
DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.
public Attr createAttributeNS(String namespaceURI,
String qualifiedName)
throws DOMException
createAttributeNS in interface DocumentnamespaceURI - The namespace URI of the attribute to create.qualifiedName - The qualified name of the attribute to instantiate.
Attr object with the following attributes:
| Attribute | Value |
|---|---|
Node.nodeName |
qualifiedName |
Node.namespaceURI |
namespaceURI |
Node.prefix |
prefix, extracted from
qualifiedName, or null if there is
no prefix |
Node.localName |
local name, extracted from
qualifiedName |
Attr.name |
qualifiedName |
Node.nodeValue |
the empty string |
DOMException - INVALID_CHARACTER_ERR: Raised if the specified
qualified name contains an illegal character, per the XML 1.0
specification . NAMESPACE_ERR: Raised if the
qualifiedName is malformed per the Namespaces in
XML specification, if the qualifiedName has a
prefix and the namespaceURI is null,
if the qualifiedName has a prefix that is "xml"
and the namespaceURI is different from "
http://www.w3.org/XML/1998/namespace", or if the
qualifiedName, or its prefix, is "xmlns" and the
namespaceURI is different from "
http://www.w3.org/2000/xmlns/". NOT_SUPPORTED_ERR: Always thrown if the current
document does not support the "XML" feature, since
namespaces were defined by XML.
public CDATASection createCDATASection(String data)
throws DOMException
CDATASection node whose value is the specified
string.
createCDATASection in interface Documentdata - The data for the CDATASection contents.
CDATASection object.
DOMException - NOT_SUPPORTED_ERR: Raised if this document is an
HTML document.public Comment createComment(String data)
Comment node given the specified string.
createComment in interface Documentdata - The data for the node.
Comment object.public DocumentFragment createDocumentFragment()
DocumentFragment object.
createDocumentFragment in interface DocumentDocumentFragment.
public Element createElement(String tagName)
throws DOMException
createElement in interface DocumenttagName - The name of the element type to instantiate. For XML, this is
case-sensitive. For HTML, the tagName parameter may
be provided in any case, but it must be mapped to the canonical
uppercase form by the DOM implementation.
Element object with the
nodeName attribute set to tagName,
and localName, prefix, and
namespaceURI set to null.
DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.
public Element createElementNS(String namespaceURI,
String qualifiedName)
throws DOMException
createElementNS in interface DocumentnamespaceURI - The namespace URI of the element to create.qualifiedName - The qualified name of the element type to instantiate.
Element object with the following
attributes: | Attribute | Value |
|---|---|
Node.nodeName |
qualifiedName |
Node.namespaceURI |
namespaceURI |
Node.prefix |
prefix, extracted from
qualifiedName, or null if there is
no prefix |
Node.localName |
local name, extracted from
qualifiedName |
Element.tagName |
qualifiedName |
DOMException - INVALID_CHARACTER_ERR: Raised if the specified
qualified name contains an illegal character, per the XML 1.0
specification . NAMESPACE_ERR: Raised if the
qualifiedName is malformed per the Namespaces in
XML specification, if the qualifiedName has a
prefix and the namespaceURI is null,
or if the qualifiedName has a prefix that is "xml"
and the namespaceURI is different from "
http://www.w3.org/XML/1998/namespace" . NOT_SUPPORTED_ERR: Always thrown if the current
document does not support the "XML" feature, since
namespaces were defined by XML.
public EntityReference createEntityReference(String name)
throws DOMException
EntityReference object.
createEntityReference in interface Documentname - The name of the entity to reference.
EntityReference object.
DOMException - INVALID_CHARACTER_ERR: Raised if the specified
name contains an illegal character. NOT_SUPPORTED_ERR: Raised if this document is an
HTML document.
public ProcessingInstruction createProcessingInstruction(String target,
String data)
throws DOMException
ProcessingInstruction node given the specified
name and data strings.
createProcessingInstruction in interface Documenttarget - The target part of the processing instruction.data - The data for the node.
ProcessingInstruction object.
DOMException - INVALID_CHARACTER_ERR: Raised if the specified
target contains an illegal character. NOT_SUPPORTED_ERR: Raised if this document is an
HTML document.public Text createTextNode(String data)
Text node given the specified string.
createTextNode in interface Documentdata - The data for the node.
Text object.public NamedNodeMap getAttributes()
NamedNodeMap containing the attributes of this node (if
it is an Element) or null otherwise.
getAttributes in interface Nodepublic NodeList getChildNodes()
NodeList that contains all children of this node.
getChildNodes in interface Nodepublic DocumentType getDoctype()
DocumentType)
associated with this document.
getDoctype in interface Documentpublic Element getDocumentElement()
getDocumentElement in interface Documentpublic Element getElementById(String elementId)
Element whose ID is given by
elementId.
getElementById in interface DocumentelementId - The unique id value for an element.
public NodeList getElementsByTagName(String tagname)
NodeList of all the Elements with
a given tag name in the order in which they are encountered in a preorder
traversal of the Document tree.
getElementsByTagName in interface Documenttagname - The name of the tag to match on. The special value "*" matches all
tags.
NodeList object containing all the matched
Elements.
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
NodeList of all the Elements with
a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of the Document tree.
getElementsByTagNameNS in interface DocumentnamespaceURI - The namespace URI of the elements to match on. The special value
"*" matches all namespaces.localName - The local name of the elements to match on. The special value "*"
matches all local names.
NodeList object containing all the matched
Elements.protected abstract Node getXmlNode(Node node)
node - -
Node to convert to an XmlNode
protected abstract NodeList getXmlNodeList(NodeList nodeList)
nodeList - -
Node to convert to an XmlNodeList
public Node getFirstChild()
getFirstChild in interface Nodepublic DOMImplementation getImplementation()
DOMImplementation object that handles this document.
getImplementation in interface Documentpublic Node getLastChild()
getLastChild in interface Nodepublic String getLocalName()
getLocalName in interface Nodepublic String getNamespaceURI()
null if it is
unspecified.
getNamespaceURI in interface Nodepublic Node getNextSibling()
getNextSibling in interface Nodepublic String getNodeName()
getNodeName in interface Nodepublic short getNodeType()
getNodeType in interface Node
public String getNodeValue()
throws DOMException
getNodeValue in interface NodeDOMException - DOMSTRING_SIZE_ERR: Raised when it would return
more characters than fit in a DOMString variable
on the implementation platform.public Document getOwnerDocument()
Document object associated with this node.
getOwnerDocument in interface Nodepublic Node getParentNode()
getParentNode in interface Nodepublic String getPrefix()
null if it is
unspecified.
getPrefix in interface Nodepublic Node getPreviousSibling()
getPreviousSibling in interface Nodepublic boolean hasAttributes()
hasAttributes in interface Nodetrue if this node has any attributes,
false otherwise.public boolean hasChildNodes()
hasChildNodes in interface Nodetrue if this node has any children,
false otherwise.
public Node importNode(Node importedNode,
boolean deep)
throws DOMException
importNode in interface DocumentimportedNode - The node to import.deep - If true, recursively import the subtree under the
specified node; if false, import only the node
itself, as explained above. This has no effect on
Attr , EntityReference, and
Notation nodes.
Document.
DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is
not supported.public String getInputEncoding()
getInputEncoding in interface Documentpublic String getXmlEncoding()
getXmlEncoding in interface Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface Document
public void setXmlStandalone(boolean xmlStandalone)
throws DOMException
setXmlStandalone in interface DocumentxmlStandalone - boolean
DOMException - NOT_SUPPORTED_ERR: Raised if this document does not support the
"XML" feature.public String getXmlVersion()
getXmlVersion in interface Document
public void setXmlVersion(String xmlVersion)
throws DOMException
setXmlVersion in interface DocumentxmlVersion - String
DOMException - NOT_SUPPORTED_ERR: Raised if the version is set to a value that
is not supported by this Document or if this
document does not support the "XML" feature.public boolean getStrictErrorChecking()
getStrictErrorChecking in interface Documentpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface DocumentstrictErrorChecking - booleanpublic String getDocumentURI()
null if undefined or if
the Document was created using
DOMImplementation.createDocument.
getDocumentURI in interface Documentpublic void setDocumentURI(String documentURI)
null if undefined or if
the Document was created using
DOMImplementation.createDocument.
setDocumentURI in interface DocumentdocumentURI - String
public Node adoptNode(Node source)
throws DOMException
adoptNode in interface Documentsource - The node to move into this document.
null if this operation fails,
such as when the source node comes from a different
implementation.
DOMException - NOT_SUPPORTED_ERR: Raised if the source node is of type
DOCUMENT, DOCUMENT_TYPE. public DOMConfiguration getDomConfig()
Document.normalizeDocument()
is invoked.
getDomConfig in interface Documentpublic void normalizeDocument()
normalizeDocument in interface Document
public Node renameNode(Node n,
String namespaceURI,
String qualifiedName)
throws DOMException
ELEMENT_NODE or
ATTRIBUTE_NODE.
renameNode in interface Documentn - The node to rename.namespaceURI - The new namespace URI.qualifiedName - The new qualified name.
DOMException - NOT_SUPPORTED_ERR: Raised when the type of the specified node is
neither ELEMENT_NODE nor
ATTRIBUTE_NODE, or if the implementation does not
support the renaming of the document element. Document.xmlVersion attribute. qualifiedName is a
malformed qualified name, if the qualifiedName has
a prefix and the namespaceURI is null,
or if the qualifiedName has a prefix that is "xml"
and the namespaceURI is different from "
http://www.w3.org/XML/1998/namespace" [XML
Namespaces] . Also raised, when the node being renamed is an
attribute, if the qualifiedName, or its prefix,
is "xmlns" and the namespaceURI is different from "
http://www.w3.org/2000/xmlns/".
public Node insertBefore(Node newChild,
Node refChild)
throws DOMException
newChild before the existing child node
refChild.
insertBefore in interface NodenewChild - The node to insert.refChild - The reference node, i.e., the node before which the new node must
be inserted.
DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of
a type that does not allow children of the type of the
newChild node, or if the node to insert is one of
this node's ancestors or this node itself. WRONG_DOCUMENT_ERR: Raised if
newChild was created from a different document
than the one that created this node.NO_MODIFICATION_ALLOWED_ERR: Raised if this node
is readonly or if the parent of the node being inserted is
readonly.NOT_FOUND_ERR: Raised if refChild
is not a child of this node.
public boolean isSupported(String feature,
String version)
isSupported in interface Nodefeature - The name of the feature to test. This is the same name which can
be passed to the method hasFeature on
DOMImplementation.version - This is the version number of the feature to test. In Level 2,
version 1, this is the string "2.0". If the version is not
specified, supporting any version of the feature will cause the
method to return true.
true if the specified feature is supported
on this node, false otherwise.public void normalize()
Text nodes in the full depth of the sub-tree
underneath this Node, including attribute nodes, into a
"normal" form where only structure (e.g., elements, comments, processing
instructions, CDATA sections, and entity references) separates
Text nodes, i.e., there are neither adjacent
Text nodes nor empty Text nodes.
normalize in interface Node
public Node removeChild(Node oldChild)
throws DOMException
oldChild from the list
of children, and returns it.
removeChild in interface NodeoldChild - The node being removed.
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node
is readonly. NOT_FOUND_ERR: Raised if oldChild
is not a child of this node.
public Node replaceChild(Node newChild,
Node oldChild)
throws DOMException
oldChild with
newChild in the list of children, and returns the
oldChild node.
replaceChild in interface NodenewChild - The new node to put in the child list.oldChild - The node being replaced in the list.
DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of
a type that does not allow children of the type of the
newChild node, or if the node to put in is one of
this node's ancestors or this node itself. WRONG_DOCUMENT_ERR: Raised if
newChild was created from a different document
than the one that created this node.NO_MODIFICATION_ALLOWED_ERR: Raised if this node
or the parent of the new node is readonly. NOT_FOUND_ERR: Raised if oldChild
is not a child of this node.
public void setNodeValue(String nodeValue)
throws DOMException
setNodeValue in interface NodenodeValue - String
DOMException - DOMSTRING_SIZE_ERR: Raised when it would return
more characters than fit in a DOMString variable
on the implementation platform.
public void setPrefix(String prefix)
throws DOMException
null if it is
unspecified.
setPrefix in interface Nodeprefix - String
DOMException - INVALID_CHARACTER_ERR: Raised if the specified
prefix contains an illegal character, per the XML 1.0
specification . NO_MODIFICATION_ALLOWED_ERR: Raised if this node
is readonly.NAMESPACE_ERR: Raised if the specified
prefix is malformed per the Namespaces in XML
specification, if the namespaceURI of this node is
null, if the specified prefix is "xml" and the
namespaceURI of this node is different from
"http://www.w3.org/XML/1998/namespace", if this node is an
attribute and the specified prefix is "xmlns" and the
namespaceURI of this node is different from "
http://www.w3.org/2000/xmlns/", or if this node is an attribute
and the qualifiedName of this node is "xmlns" .public String getBaseURI()
null if the
implementation wasn't able to obtain an absolute URI.
getBaseURI in interface Node
public short compareDocumentPosition(Node other)
throws DOMException
compareDocumentPosition in interface Nodeother - The node to compare against the reference node.
DOMException - NOT_SUPPORTED_ERR: when the compared nodes are from different DOM
implementations that do not coordinate to return consistent
implementation-specific results.
public String getTextContent()
throws DOMException
getTextContent in interface NodeDOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters
than fit in a DOMString variable on the
implementation platform.
public void setTextContent(String textContent)
throws DOMException
setTextContent in interface NodetextContent - String
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.public boolean isSameNode(Node other)
isSameNode in interface Nodeother - The node to test against.
true if the nodes are the same,
false otherwise.public String lookupPrefix(String namespaceURI)
lookupPrefix in interface NodenamespaceURI - The namespace URI to look for.
null if none is found. If more than one prefix are
associated to the namespace prefix, the returned namespace prefix
is implementation dependent.public boolean isDefaultNamespace(String namespaceURI)
namespaceURI is the
default namespace or not.
isDefaultNamespace in interface NodenamespaceURI - The namespace URI to look for.
true if the specified
namespaceURI is the default namespace,
false otherwise.public String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface Nodeprefix - The prefix to look for. If this parameter is null,
the method will return the default namespace URI if any.
null if
none is found.public boolean isEqualNode(Node arg)
isEqualNode in interface Nodearg - The node to compare equality with.
true if the nodes are equal,
false otherwise.
public Object getFeature(String feature,
String version)
getFeature in interface Nodefeature - The name of the feature requested. Note that any plus sign "+"
prepended to the name of the feature will be ignored since it is
not significant in the context of this method.version - This is the version number of the feature to test.
null if
there is no object which implements interfaces associated with
that feature. If the DOMObject returned by this
method implements the Node interface, it must
delegate to the primary core Node and not return
results inconsistent with the primary core Node
such as attributes, childNodes, etc.
public Object setUserData(String key,
Object data,
UserDataHandler handler)
setUserData in interface Nodekey - The key to associate the object to.data - The object to associate to the given key, or null
to remove any existing association to that key.handler - The handler to associate to that key, or null.
DOMUserData previously associated to
the given key on this node, or null if there was
none.public Object getUserData(String key)
getUserData in interface Nodekey - The key the object is associated to.
DOMUserData associated to the given
key on this node, or null if there was none.
public void writeXml(XmlWriter writer)
throws IOException
writeXml in interface XmlWritablewriter - XMLWriter used when writing XML text.
IOException - Error in writing.
public void writeChildrenXml(XmlWriter writer)
throws IOException
writeChildrenXml in interface XmlWritablewriter - XMLWriter used when writing XML text.
IOException - Error in writing.
public String toXml()
throws IOException
IOException - Error writing to the writer.public String toString()
toString creation
is used.
toString in class Objectprivate Node getRawNode(Node arg)
arg - The node that may be wrapping a raw node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||