Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.10

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: xml :: dom ::

interface XNamedNodeMap

Methods' Summary
getLength The number of nodes in this map.  
getNamedItem Retrieves a node specified by local name  
getNamedItemNS Retrieves a node specified by local name and namespace URI.  
item Returns the indexth item in the map.  
removeNamedItem Removes a node specified by name. Throws: DOMException - NOT_FOUND_ERR: Raised if there is no node named name in this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.  
removeNamedItemNS Removes a node specified by local name and namespace URI. Throws: DOMException - NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.  
setNamedItem Adds a node using its nodeName attribute. Throws: DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.  
setNamedItemNS Adds a node using its namespaceURI and localName. Throws: DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities. NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.  
Methods' Details
getLength
long
getLength();

Description
The number of nodes in this map.
getNamedItem
XNode
getNamedItem( [in] string  name );

Description
Retrieves a node specified by local name
getNamedItemNS
XNode
getNamedItemNS( [in] string  namespaceURI,
[in] string  localName );

Description
Retrieves a node specified by local name and namespace URI.
item
XNode
item( [in] long  index );

Description
Returns the indexth item in the map.
removeNamedItem
XNode
removeNamedItem( [in] string  name )
raises( DOMException );

Description
Removes a node specified by name. Throws: DOMException - NOT_FOUND_ERR: Raised if there is no node named name in this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
removeNamedItemNS
XNode
removeNamedItemNS( [in] string  namespaceURI,
[in] string  localName )
raises( DOMException );

Description
Removes a node specified by local name and namespace URI. Throws: DOMException - NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
setNamedItem
XNode
setNamedItem( [in] XNode  arg )
raises( DOMException );

Description
Adds a node using its nodeName attribute. Throws: DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.
setNamedItemNS
XNode
setNamedItemNS( [in] XNode  arg )
raises( DOMException );

Description
Adds a node using its namespaceURI and localName. Throws: DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities. NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.