Packagedom.core
Interfacepublic interface NameList

Introduced in: DOM 3 Core 

The NameList interface provides the abstraction of an ordered collection of parallel pairs of name and namespace values (which could be null values), without defining or constraining how this collection is implemented. The items in the NameList are accessible via an integral index, starting from 0.

Note (Mozilla): Although there is an XPCOM interface for it, this does not seem to be implemented in Mozilla

See also

MDC - NameList
W3C - NameList


Public Properties
 PropertyDefined By
  DOM 3 Core length : Number
[read-only] The number of pairs (name and namespaceURI) in the list.
NameList
Public Methods
 MethodDefined By
  
DOM 3 Core contains(str:DOMString):Boolean
Test if a name is part of this NameList.
NameList
  
DOM 3 Core containsNS(namespaceURI:DOMString, name:DOMString):Boolean
Test if the pair namespaceURI/name is part of this NameList.
NameList
  
DOM 3 Core getName(index:Number):DOMString
Returns the indexth name item in the collection.
NameList
  
DOM 3 Core getNamespaceURI(index:Number):DOMString
Returns the indexth namespaceURI item in the collection.
NameList
Property Detail
DOM 3 Core lengthproperty
length:Number  [read-only]

Introduced in: DOM 3 Core 

The number of pairs (name and namespaceURI) in the list. The range of valid child node indices is 0 to length-1 inclusive.


Implementation
    public function get length():Number

See also

Method Detail
DOM 3 Core contains()method
public function contains(str:DOMString):Boolean

Introduced in: DOM 3 Core 

Test if a name is part of this NameList.

Parameters

str:DOMString — The name to look for.

Returns
Boolean — If the name has been found.

See also

DOM 3 Core containsNS()method 
public function containsNS(namespaceURI:DOMString, name:DOMString):Boolean

Introduced in: DOM 3 Core 

Test if the pair namespaceURI/name is part of this NameList.

Parameters

namespaceURI:DOMString — The namespace URI to look for.
 
name:DOMString — The name to look for.

Returns
Boolean — If the pair namespaceURI/name has been found.

See also

DOM 3 Core getName()method 
public function getName(index:Number):DOMString

Introduced in: DOM 3 Core 

Returns the indexth name item in the collection.

Parameters

index:Number — Index into the collection.

Returns
DOMString — The name at the indexth position in the NameList, or null if there is no name for the specified index or if the index is out of range.

See also

DOM 3 Core getNamespaceURI()method 
public function getNamespaceURI(index:Number):DOMString

Introduced in: DOM 3 Core 

Returns the indexth namespaceURI item in the collection.

Parameters

index:Number — Index into the collection.

Returns
DOMString — The namespace URI at the indexth position in the NameList, or null if there is no name for the specified index or if the index is out of range.

See also