gnu.xml.dom
Class DomNsNode
java.lang.Object
|
+--gnu.xml.dom.DomNode
|
+--gnu.xml.dom.DomNsNode
- All Implemented Interfaces:
- java.lang.Cloneable, DocumentEvent, EventTarget, Node, NodeList
- Direct Known Subclasses:
- DomAttr, DomElement
- public abstract class DomNsNode
- extends DomNode
Abstract implemention of namespace support. This facilitates
sharing code for attribute and element nodes.
- Version:
- $Date: 2001/11/20 04:53:46 $
- Author:
- David Brownell
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
|
Method Summary |
java.lang.String |
getLocalName()
DOM L2
Returns the local part of the node's name (after any colon),
or null if the node name is not namespace scoped. |
java.lang.String |
getNamespaceURI()
DOM L2
Returns the node's namespace URI
or null if the node name is not namespace scoped. |
java.lang.String |
getNodeName()
DOM L1
Returns the node's name, including any namespace prefix. |
java.lang.String |
getPrefix()
DOM L2
Returns any prefix part of the node's name (before any colon). |
void |
setPrefix(java.lang.String prefix)
DOM L2
Assigns the prefix part of the node's name (before any colon). |
| Methods inherited from class gnu.xml.dom.DomNode |
addEventListener, appendChild, clone, cloneNode, compact, createEvent, dispatchEvent, getAttributes, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getLength, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isReadonly, isSupported, item, makeReadonly, nameAndTypeEquals, normalize, removeChild, removeEventListener, replaceChild, setNodeValue, trimToSize |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getNodeName
public final java.lang.String getNodeName()
- DOM L1
Returns the node's name, including any namespace prefix.
getNamespaceURI
public final java.lang.String getNamespaceURI()
- DOM L2
Returns the node's namespace URI
or null if the node name is not namespace scoped.
- Overrides:
getNamespaceURI in class DomNode
getPrefix
public java.lang.String getPrefix()
- DOM L2
Returns any prefix part of the node's name (before any colon).
- Overrides:
getPrefix in class DomNode
- Following copied from interface:
org.w3c.dom.Node
- Throws:
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" .
setPrefix
public void setPrefix(java.lang.String prefix)
- DOM L2
Assigns the prefix part of the node's name (before any colon).
- Overrides:
setPrefix in class DomNode
- Following copied from interface:
org.w3c.dom.Node
- Throws:
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" .
getLocalName
public java.lang.String getLocalName()
- DOM L2
Returns the local part of the node's name (after any colon),
or null if the node name is not namespace scoped.
- Overrides:
getLocalName in class DomNode
Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2001-11-20.