286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286N/A * This code is free software; you can redistribute it and/or modify it 286N/A * under the terms of the GNU General Public License version 2 only, as 286N/A * published by the Free Software Foundation. Oracle designates this 286N/A * particular file as subject to the "Classpath" exception as provided 286N/A * by Oracle in the LICENSE file that accompanied this code. 286N/A * This code is distributed in the hope that it will be useful, but WITHOUT 286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 286N/A * version 2 for more details (a copy is included in the LICENSE file that 286N/A * accompanied this code). 286N/A * You should have received a copy of the GNU General Public License version 286N/A * 2 along with this work; if not, write to the Free Software Foundation, 286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 286N/A * or visit www.oracle.com if you need additional information or have any 286N/A * This file is available under and governed by the GNU General Public 286N/A * License version 2 only, as published by the Free Software Foundation. 286N/A * However, the following notice accompanied the original version of this 286N/A * file and, per its terms, should not be removed: 286N/A * Copyright (c) 2004 World Wide Web Consortium, 286N/A * (Massachusetts Institute of Technology, European Research Consortium for 286N/A * Informatics and Mathematics, Keio University). All Rights Reserved. This 286N/A * work is distributed under the W3C(r) Software License [1] in the hope that 286N/A * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 286N/A * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 286N/A * Objects implementing the <code>NamedNodeMap</code> interface are used to 286N/A * represent collections of nodes that can be accessed by name. Note that 286N/A * <code>NamedNodeMap</code> does not inherit from <code>NodeList</code>; 286N/A * <code>NamedNodeMaps</code> are not maintained in any particular order. 286N/A * Objects contained in an object implementing <code>NamedNodeMap</code> may 286N/A * also be accessed by an ordinal index, but this is simply to allow 286N/A * convenient enumeration of the contents of a <code>NamedNodeMap</code>, 286N/A * and does not imply that the DOM specifies an order to these Nodes. 286N/A * <p><code>NamedNodeMap</code> objects in the DOM are live. 286N/A * Retrieves a node specified by name. 286N/A * @param name The <code>nodeName</code> of a node to retrieve. 286N/A * @return A <code>Node</code> (of any type) with the specified 286N/A * <code>nodeName</code>, or <code>null</code> if it does not identify 286N/A * any node in this map. 286N/A * Adds a node using its <code>nodeName</code> attribute. If a node with 286N/A * that name is already present in this map, it is replaced by the new 286N/A * one. Replacing a node by itself has no effect. 286N/A * <br>As the <code>nodeName</code> attribute is used to derive the name 286N/A * which the node must be stored under, multiple nodes of certain types 286N/A * (those that have a "special" string value) cannot be stored as the 286N/A * names would clash. This is seen as preferable to allowing nodes to be 286N/A * @param arg A node to store in this map. The node will later be 286N/A * accessible using the value of its <code>nodeName</code> attribute. 286N/A * @return If the new <code>Node</code> replaces an existing node the 286N/A * replaced <code>Node</code> is returned, otherwise <code>null</code> 286N/A * @exception DOMException 286N/A * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a 286N/A * different document than the one that created this map. 286N/A * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. 286N/A * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an 286N/A * <code>Attr</code> that is already an attribute of another 286N/A * <code>Element</code> object. The DOM user must explicitly clone 286N/A * <code>Attr</code> nodes to re-use them in other elements. 286N/A * <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node 286N/A * doesn't belong in this NamedNodeMap. Examples would include trying 286N/A * to insert something other than an Attr node into an Element's map 286N/A * of attributes, or a non-Entity node into the DocumentType's map of 286N/A * Removes a node specified by name. When this map contains the attributes 286N/A * attached to an element, if the removed attribute is known to have a 286N/A * default value, an attribute immediately appears containing the 286N/A * default value as well as the corresponding namespace URI, local name, 286N/A * and prefix when applicable. 286N/A * @param name The <code>nodeName</code> of the node to remove. 286N/A * @return The node removed from this map if a node with such a name 286N/A * @exception DOMException 286N/A * NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in 286N/A * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. 286N/A * Returns the <code>index</code>th item in the map. If <code>index</code> 286N/A * is greater than or equal to the number of nodes in this map, this 286N/A * returns <code>null</code>. 286N/A * @param index Index into this map. 286N/A * @return The node at the <code>index</code>th position in the map, or 286N/A * <code>null</code> if that is not a valid index. 286N/A * The number of nodes in this map. The range of valid child node indices 286N/A * is <code>0</code> to <code>length-1</code> inclusive. 286N/A * Retrieves a node specified by local name and namespace URI. 286N/A * , applications must use the value null as the namespaceURI parameter 286N/A * for methods if they wish to have no namespace. 286N/A * @param namespaceURI The namespace URI of the node to retrieve. 286N/A * @param localName The local name of the node to retrieve. 286N/A * @return A <code>Node</code> (of any type) with the specified local 286N/A * name and namespace URI, or <code>null</code> if they do not 286N/A * identify any node in this map. 286N/A * @exception DOMException 286N/A * NOT_SUPPORTED_ERR: May be raised if the implementation does not 286N/A * support the feature "XML" and the language exposed through the 286N/A * Adds a node using its <code>namespaceURI</code> and 286N/A * <code>localName</code>. If a node with that namespace URI and that 286N/A * local name is already present in this map, it is replaced by the new 286N/A * one. Replacing a node by itself has no effect. 286N/A * , applications must use the value null as the namespaceURI parameter 286N/A * for methods if they wish to have no namespace. 286N/A * @param arg A node to store in this map. The node will later be 286N/A * accessible using the value of its <code>namespaceURI</code> and 286N/A * <code>localName</code> attributes. 286N/A * @return If the new <code>Node</code> replaces an existing node the 286N/A * replaced <code>Node</code> is returned, otherwise <code>null</code> 286N/A * @exception DOMException 286N/A * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a 286N/A * different document than the one that created this map. 286N/A * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. 286N/A * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an 286N/A * <code>Attr</code> that is already an attribute of another 286N/A * <code>Element</code> object. The DOM user must explicitly clone 286N/A * <code>Attr</code> nodes to re-use them in other elements. 286N/A * <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node 286N/A * doesn't belong in this NamedNodeMap. Examples would include trying 286N/A * to insert something other than an Attr node into an Element's map 286N/A * of attributes, or a non-Entity node into the DocumentType's map of 286N/A * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not 286N/A * support the feature "XML" and the language exposed through the 286N/A * Removes a node specified by local name and namespace URI. A removed 286N/A * attribute may be known to have a default value when this map contains 286N/A * the attributes attached to an element, as returned by the attributes 286N/A * attribute of the <code>Node</code> interface. If so, an attribute 286N/A * immediately appears containing the default value as well as the 286N/A * corresponding namespace URI, local name, and prefix when applicable. 286N/A * , applications must use the value null as the namespaceURI parameter 286N/A * for methods if they wish to have no namespace. 286N/A * @param namespaceURI The namespace URI of the node to remove. 286N/A * @param localName The local name of the node to remove. 286N/A * @return The node removed from this map if a node with such a local 286N/A * name and namespace URI exists. 286N/A * @exception DOMException 286N/A * NOT_FOUND_ERR: Raised if there is no node with the specified 286N/A * <code>namespaceURI</code> and <code>localName</code> in this map. 286N/A * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. 286N/A * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not 286N/A * support the feature "XML" and the language exposed through the