Packagedom.xpath
Classpublic class XPathNamespace
InheritanceXPathNamespace Inheritance Node Inheritance Object

Introduced in: DOM 3 XPath 

The XPathNamespace interface is returned by XPathResult interfaces to represent the XPath namespace node type that DOM lacks. There is no public constructor for this node type. Attempts to place it into a hierarchy or a NamedNodeMap result in a DOMException with the code HIERARCHY_REQUEST_ERR. This node is read only, so methods or setting of attributes that would mutate the node result in a DOMException with the code NO_MODIFICATION_ALLOWED_ERR.

The core specification describes attributes of the Node interface that are different for different node types but does not describe XPATH_NAMESPACE_NODE, so here is a description of those attributes for this node type. All attributes of Node not described in this section have a null or false value.

ownerDocument matches the ownerDocument of the ownerElement even if the element is later adopted.

nodeName is always the string "#namespace".

prefix is the prefix of the namespace represented by the node.

localName is the same as prefix.

nodeType is equal to XPATH_NAMESPACE_NODE.

namespaceURI is the namespace URI of the namespace represented by the node.

nodeValue is the same as namespaceURI.

adoptNode, cloneNode, and importNode fail on this node type by raising a DOMException with the code NOT_SUPPORTED_ERR.

Note: In future versions of the XPath specification, the definition of a namespace node may be changed incomatibly, in which case incompatible changes to field values may be required to implement versions beyond XPath 1.0.

See also

W3C - XPathNamespace


Public Properties
 PropertyDefined By
 InheritedDOM 1 Core attributes : NamedNodeMap
[read-only] Returns an unordered collection of Attr nodes.
Node
 InheritedNon-Standard baseName : DOMString
[read-only] Returns the base name for the name qualified with the namespace.
Node
 InheritedDOM 3 Core baseURI : DOMString
[read-only] The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.
Node
 InheritedDOM 1 Core childNodes : NodeList
[read-only] Returns an ordered collection of node objects that are children of the current element.
Node
 InheritedNon-Standard dataType : *
Specifies the data type for this node.
Node
 InheritedNon-Standard definition : Node
[read-only] Returns the definition of the node in the document type definition (DTD) or schema.
Node
 InheritedDOM 1 Core firstChild : Node
[read-only] Returns the node's first child in the tree, or null if the node is childless.
Node
 InheritedDOM 1 Core lastChild : Node
[read-only] Returns the last child of a node.
Node
 InheritedDOM 2 Core localName : DOMString
[read-only] Returns the local part of the qualified name of this node.
Node
 InheritedDOM 2 Core namespaceURI : DOMString
[read-only] The namespace URI of the node, or null if it is unspecified (read-only).
Node
 InheritedDOM 1 Core nextSibling : Node
[read-only] Returns the node immediately following the specified one in its parent's childNodes list, or null if the specified node is the last node in that list.
Node
 InheritedDOM 1 Core nodeName : DOMString
[read-only] Returns the name of the current node as a string.
Node
 InheritedNon-Standard nodePrincipal : nsIPrincipal
[read-only] Returns the nsIPrincipal object representing current security context of the node.
Node
 InheritedDOM 1 Core nodeType : Number
[read-only] Returns an integer code representing the type of the node.
Node
 InheritedNon-Standard nodeTypedValue : *
Contains the node value expressed in its defined data type.
Node
 InheritedNon-Standard nodeTypeString : DOMString
[read-only] Returns the node type in string form.
Node
 InheritedDOM 1 Core nodeValue : DOMString
Returns or sets the value of the current node.
Node
 InheritedDOM 1 Core ownerDocument : Document
[read-only] The Document object associated with this node.
Node
  DOM 3 XPath ownerElement : Element
[read-only] The Element on which the namespace was in scope when it was requested.
XPathNamespace
 InheritedDOM 1 Core parentNode : Node
[read-only] Returns the parent of the specified node in the DOM tree.
Node
 InheritedNon-Standard parsed : Boolean
[read-only] Indicates the parsed status of the node and child nodes.
Node
 InheritedDOM 2 Core prefix : DOMString
Returns the namespace prefix of the specified node, or null if no prefix is specified.
Node
 InheritedDOM 1 Core previousSibling : Node
[read-only] Returns the node immediately preceding the specified one in its parent's childNodes list, null if the specified node is the first in that list.
Node
 InheritedNon-Standard specified : Boolean
[read-only] Indicates whether the node (usually an attribute) is explicitly specified or derived from a default value in the document type definition (DTD) or schema.
Node
 InheritedNon-Standard text : DOMString
Represents the text content of the node or the concatenated text representing the node and its descendants.
Node
 InheritedDOM 3 Core textContent : DOMString
Gets or sets the text content of a node and its descendants.
Node
 InheritedNon-Standard xml : DOMString
[read-only] Contains the XML representation of the node and all its descendants.
Node
Public Methods
 MethodDefined By
 Inherited
DOM 2 Events addEventListener(type:DOMString, listener:EventListener, useCapture:Boolean):void
Associates a function with a particular event and binds the event to the current node.
Node
 Inherited
DOM 3 Events addEventListenerNS(namespaceURI:DOMString, type:DOMString, listener:EventListener, useCapture:Boolean):void
Registers an event listener, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases.
Node
 Inherited
DOM 1 Core appendChild(element:Node):Node
Adds a node to the end of the list of children of a specified parent node.
Node
 Inherited
DOM 1 Core cloneNode(cloneChildren:Boolean):Node
Returns a duplicate of the current node.
Node
 Inherited
DOM 3 Core compareDocumentPosition(other:Node):Number
Compares the position of the current node against another node in any other document.
Node
 Inherited
DOM 2 Events dispatchEvent(evt:Event):Boolean
Dispatches an event to fire on a node artificially.
Node
 Inherited
DOM 3 Core getFeature(feature:DOMString, version:DOMString):DOMObject
This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in DOM Features.
Node
 Inherited
Retrieves the object associated to a key on a this node.
Node
 Inherited
DOM 2 Core hasAttributes():Boolean
Returns a boolean value of true or false, indicating if the current element has any attributes or not.
Node
 Inherited
DOM 1 Core hasChildNodes():Boolean
Returns a value that indicates whether the object has children.
Node
 Inherited
DOM 1 Core insertBefore(newNode:Node, childNode:Node):Node
Inserts the specified node before a reference element as a child of the current node.
Node
 Inherited
DOM 3 Core isDefaultNamespace(namespaceURI:DOMString):Boolean
Returns true if the namespace is the default namespace on the given node or false if not.
Node
 Inherited
DOM 3 Core isEqualNode(arg:Node):Boolean
Tests whether two nodes are equal.
Node
 Inherited
DOM 3 Core isSameNode(other:Node):Boolean
Returns whether this node is the same node as the given one.
Node
 Inherited
DOM 2 Core isSupported(feature:DOMString, version:DOMString):Boolean
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
Node
 Inherited
Takes a prefix and returns the namespaceURI associated with it on the given node if found (and null if not).
Node
 Inherited
DOM 3 Core lookupPrefix(namespaceURI:DOMString):DOMString
Returns the prefix for a given namespaceURI if present, and null if not.
Node
 Inherited
DOM 1 Core normalize():void
Puts the specified node and all of its subtree into a "normalized" form.
Node
 Inherited
DOM 1 Core removeChild(node:Node):Node
Removes a child node from the object.
Node
 Inherited
DOM 2 Events removeEventListener(type:DOMString, listener:EventListener, useCapture:Boolean):void
Removes an event listener.
Node
 Inherited
DOM 3 Events removeEventListenerNS(namespaceURI:DOMString, type:DOMString, listener:EventListener, useCapture:Boolean):void
Removes an event listener.
Node
 Inherited
DOM 1 Core replaceChild(newNode:Node, childNode:Node):Node
Replaces an existing child element with a new child element.
Node
 Inherited
Non-Standard selectNodes(queryString:DOMString):NodeList
Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as IXMLDOMNodeList.
Node
 Inherited
Non-Standard selectSingleNode(queryString:DOMString):Node
Applies the specified pattern-matching operation to this node's context and returns the first matching node.
Node
 Inherited
Associate an object to a key on this node.
Node
 Inherited
Non-Standard transformNode(styleSheet:Node):DOMString
Processes this node and its children using the supplied Extensible Stylesheet Language Transformations (XSLT) style sheet and returns the resulting transformation.
Node
 Inherited
Non-Standard transformNodeToObject(styleSheet:Node, outputObject:*):void
Processes this node and its children using the supplied Extensible Stylesheet Language Transformations (XSLT) style sheet and returns the resulting transformation.
Node
Public Constants
 ConstantDefined By
 InheritedDOM 1 Core ATTRIBUTE_NODE : Number = 2
[static] The node is an Attr.
Node
 InheritedDOM 1 Core CDATA_SECTION_NODE : Number = 4
[static] The node is a CDATASection.
Node
 InheritedDOM 1 Core COMMENT_NODE : Number = 8
[static] The node is a Comment.
Node
 InheritedDOM 1 Core DOCUMENT_FRAGMENT_NODE : Number = 11
[static] The node is a DocumentFragment.
Node
 InheritedDOM 1 Core DOCUMENT_NODE : Number = 9
[static] The node is a Document.
Node
 InheritedDOM 3 Core DOCUMENT_POSITION_CONTAINED_BY : Number = 16
[static] The node is contained by the reference node.
Node
 InheritedDOM 3 Core DOCUMENT_POSITION_CONTAINS : Number = 8
[static] The node contains the reference node.
Node
 InheritedDOM 3 Core DOCUMENT_POSITION_DISCONNECTED : Number = 1
[static] The two nodes are disconnected.
Node
 InheritedDOM 3 Core DOCUMENT_POSITION_FOLLOWING : Number = 4
[static] The node follows the reference node.
Node
 InheritedDOM 3 Core DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC : Number = 32
[static] The determination of preceding versus following is implementation-specific.
Node
 InheritedDOM 3 Core DOCUMENT_POSITION_PRECEDING : Number = 2
[static] The second node precedes the reference node.
Node
 InheritedDOM 1 Core DOCUMENT_TYPE_NODE : Number = 10
[static] The node is a DocumentType.
Node
 InheritedDOM 1 Core ELEMENT_NODE : Number = 1
[static] The node is an Element.
Node
 InheritedDOM 1 Core ENTITY_NODE : Number = 6
[static] The node is an Entity.
Node
 InheritedDOM 1 Core ENTITY_REFERENCE_NODE : Number = 5
[static] The node is an EntityReference.
Node
 InheritedDOM 1 Core NOTATION_NODE : Number = 12
[static] The node is a Notation.
Node
 InheritedDOM 1 Core PROCESSING_INSTRUCTION_NODE : Number = 7
[static] The node is a ProcessingInstruction.
Node
 InheritedDOM 1 Core TEXT_NODE : Number = 3
[static] The node is a Text node.
Node
  DOM 3 XPath XPATH_NAMESPACE_NODE : Number = 13
[static] An integer indicating which type of node this is.
XPathNamespace
Property Detail
DOM 3 XPath ownerElementproperty
ownerElement:Element  [read-only]

Introduced in: DOM 3 XPath 

The Element on which the namespace was in scope when it was requested. This does not change on a returned namespace node even if the document changes such that the namespace goes out of scope on that element and this node is no longer found there by XPath.


Implementation
    public function get ownerElement():Element

See also

Constant Detail
DOM 3 XPath XPATH_NAMESPACE_NODEConstant
public static const XPATH_NAMESPACE_NODE:Number = 13

Introduced in: DOM 3 XPath 

An integer indicating which type of node this is.

Note: There is currently only one type of node which is specific to XPath. The numbers in this list must not collide with the values assigned to core node types.

See also