/** * Same as removeNamedItem except that it simply returns null if the * specified local name and namespace URI is not found. */ Node safeRemoveNamedItemNS(String namespaceURI, String name) { return internalRemoveNamedItemNS(namespaceURI, name, false); }
/** * Introduced in DOM Level 2. <p> * Removes an attribute specified by local name and namespace URI. * @param namespaceURI * The namespace URI of the node to remove. * When it is null or an empty string, this * method behaves like removeNamedItem. * @param name The local name of the node to remove. If the * removed attribute is known to have a default * value, an attribute immediately appears * containing the default value. * @return Node The node removed from the map if a node with such * a local name and namespace URI exists. * @throws NOT_FOUND_ERR: Raised if there is no node named * name in the map. */ public Node removeNamedItemNS(String namespaceURI, String name) throws DOMException { return internalRemoveNamedItemNS(namespaceURI, name, true); }