com.gargoylesoftware.htmlunit.html
Class DomNamespaceNode

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.DomNode
      extended by com.gargoylesoftware.htmlunit.html.DomNamespaceNode
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
DomElement, HtmlAttr, XmlAttr, XmlElement

public abstract class DomNamespaceNode
extends DomNode

Intermediate base class for DOM Nodes that have namespaces. That includes HtmlElement and HtmlAttr.

Version:
$Revision: 2132 $
Author:
David K. Taylor, Ahmed Ashour
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode
DomNode.ChildIterator, DomNode.DescendantElementsIterator
 
Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode
ATTRIBUTE_NODE, COMMENT_NODE, DOCUMENT_NODE, ELEMENT_NODE, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED, TEXT_NODE
 
Constructor Summary
protected DomNamespaceNode(String namespaceURI, String qualifiedName, Page page)
          Create an instance of a DOM node that can have a namespace.
 
Method Summary
 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 (see ).
 String getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 String getQualifiedName()
          Returns the qualified name of this node.
 void setPrefix(String prefix)
          Set the namespace prefix of this node, or null if it is unspecified.
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode
addDomChangeListener, addPropertyChangeListener, appendChild, appendDomChild, asText, asXml, cloneDomNode, cloneNode, fireNodeAdded, fireNodeDeleted, firePropertyChange, getAllHtmlChildElements, getByXPath, getChildIterator, getChildrenAsText, getEndColumnNumber, getEndLineNumber, getEventHandler, getFirstByXPath, getFirstChild, getFirstDomChild, getLastChild, getLastDomChild, getLog, getNativePage, getNextDomSibling, getNextSibling, getNodeName, getNodeType, getNodeValue, getPage, getParentDomNode, getParentNode, getPreviousDomSibling, getPreviousSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, hasAttributes, insertBefore, isAncestorOf, isRenderedVisible, isTrimmedText, notifyIncorrectness, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, printXml, reduceWhitespace, remove, removeAllChildren, removeDomChangeListener, removeEventHandler, removePropertyChangeListener, replace, setEventHandler, setEventHandler, setNextSibling, setNodeValue, setParentNode, setPreviousSibling, setReadyState, setScriptObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomNamespaceNode

protected DomNamespaceNode(String namespaceURI,
                           String qualifiedName,
                           Page page)
Create an instance of a DOM node that can have a namespace.

Parameters:
namespaceURI - the URI that identifies an XML namespace.
qualifiedName - The qualified name of the element type to instantiate.
page - The page that contains this element.
Method Detail

getNamespaceURI

public String getNamespaceURI()
The namespace URI of this node, or null if it is unspecified (see ). This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time. For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.

Overrides:
getNamespaceURI in class DomNode
Returns:
The URI that identifies an XML namespace.

getLocalName

public String getLocalName()
Returns the local part of the qualified name of this node. For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.

Overrides:
getLocalName in class DomNode
Returns:
The local name (without prefix).

getPrefix

public String getPrefix()
The namespace prefix of this node, or null if it is unspecified.

Overrides:
getPrefix in class DomNode
Returns:
The Namespace prefix.

setPrefix

public void setPrefix(String prefix)
Set the namespace prefix of this node, or null if it is unspecified. When it is defined to be null, setting it has no effect, including if the node is read-only. Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable. Setting the prefix to null makes it unspecified, setting it to an empty string is implementation dependent. Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change. For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.

Overrides:
setPrefix in class DomNode
Parameters:
prefix - The namespace prefix of this node, or null if it is unspecified.

getQualifiedName

public String getQualifiedName()
Returns the qualified name of this node.

Returns:
The prefix and local name.


Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.