001 package railo.runtime.text.xml; 002 003 import org.w3c.dom.DOMException; 004 import org.w3c.dom.NamedNodeMap; 005 import org.w3c.dom.Node; 006 007 public class EmptyNamedNodeMap implements NamedNodeMap { 008 009 public int getLength() { 010 return 0; 011 } 012 013 public Node getNamedItem(String name) { 014 return null; 015 } 016 017 public Node getNamedItemNS(String namespaceURI, String name) { 018 return null; 019 } 020 021 public Node item(int arg0) { 022 return null; 023 } 024 025 public Node removeNamedItem(String key) throws DOMException { 026 throw new DOMException(DOMException.NOT_FOUND_ERR, "NodeMap is empty"); 027 } 028 029 public Node removeNamedItemNS(String arg0, String arg1) throws DOMException { 030 throw new DOMException(DOMException.NOT_FOUND_ERR, "NodeMap is empty"); 031 } 032 033 public Node setNamedItem(Node arg0) throws DOMException { 034 throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "NodeMap is read-only"); 035 } 036 037 public Node setNamedItemNS(Node arg0) throws DOMException { 038 throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, "NodeMap is read-only"); 039 } 040 041 }