org.openxml.dom
Class AttrNodeMap

java.lang.Object
  extended by org.openxml.dom.AttrNodeMap
All Implemented Interfaces:
NamedNodeMap

public final class AttrNodeMap
extends Object
implements NamedNodeMap

Used to traverse attributes of an element. This is a live list, meaning that any change to the element is reflected in this list and vice versa. This is implemented by iterating the element list in response to each method call.

This map must be implemented outside of ElementImpl due to method name conflict with certain HTML elements (specifically getLength()).

See Also:
NamedNodeMap

Method Summary
 int getLength()
          Return the number of attributes in this element.
 Node getNamedItem(String name)
           
 Node getNamedItemNS(String namespaceURI, String localName)
           
 Node item(int index)
          Return the nth attribute of the element (zero based).
 Node removeNamedItem(String name)
           
 Node removeNamedItemNS(String namespaceURI, String localName)
           
 Node setNamedItem(Node arg)
           
 Node setNamedItemNS(Node arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

item

public Node item(int index)
Return the nth attribute of the element (zero based). If the attribute does not exist, returns null. No exception is thrown if index is negative.

Specified by:
item in interface NamedNodeMap
Parameters:
index - Index of attribute to return (zero based)
Returns:
Attribute or null

getLength

public int getLength()
Return the number of attributes in this element.

Specified by:
getLength in interface NamedNodeMap
Returns:
Number of attributes

getNamedItem

public Node getNamedItem(String name)
Specified by:
getNamedItem in interface NamedNodeMap

getNamedItemNS

public Node getNamedItemNS(String namespaceURI,
                           String localName)
Specified by:
getNamedItemNS in interface NamedNodeMap

setNamedItem

public Node setNamedItem(Node arg)
                  throws DOMException
Specified by:
setNamedItem in interface NamedNodeMap
Throws:
DOMException

setNamedItemNS

public Node setNamedItemNS(Node arg)
                    throws DOMException
Specified by:
setNamedItemNS in interface NamedNodeMap
Throws:
DOMException

removeNamedItem

public Node removeNamedItem(String name)
                     throws DOMException
Specified by:
removeNamedItem in interface NamedNodeMap
Throws:
DOMException

removeNamedItemNS

public Node removeNamedItemNS(String namespaceURI,
                              String localName)
                       throws DOMException
Specified by:
removeNamedItemNS in interface NamedNodeMap
Throws:
DOMException


Phantom® and NetPhantom® are registered trademarks of Codectica Systems SARL.
© Copyright Codectica Systems SARL, 2008. All rights reserved.