1 5 6 package org.w3c.tidy; 7 8 import org.w3c.dom.DOMException ; 9 10 30 31 public class DOMAttrMapImpl implements org.w3c.dom.NamedNodeMap { 32 33 private AttVal first = null; 34 35 protected DOMAttrMapImpl(AttVal first) 36 { 37 this.first = first; 38 } 39 40 43 public org.w3c.dom.Node getNamedItem(String name) 44 { 45 AttVal att = this.first; 46 while (att != null) { 47 if (att.attribute.equals(name)) break; 48 att = att.next; 49 } 50 if (att != null) 51 return att.getAdapter(); 52 else 53 return null; 54 } 55 56 59 public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg) 60 throws DOMException 61 { 62 return null; 64 } 65 66 69 public org.w3c.dom.Node removeNamedItem(String name) 70 throws DOMException 71 { 72 return null; 74 } 75 76 79 public org.w3c.dom.Node item(int index) 80 { 81 int i = 0; 82 AttVal att = this.first; 83 while (att != null) { 84 if (i >= index) break; 85 i++; 86 att = att.next; 87 } 88 if (att != null) 89 return att.getAdapter(); 90 else 91 return null; 92 } 93 94 97 public int getLength() 98 { 99 int len = 0; 100 AttVal att = this.first; 101 while (att != null) { 102 len++; 103 att = att.next; 104 } 105 return len; 106 } 107 108 111 public org.w3c.dom.Node getNamedItemNS(String namespaceURI, 112 String localName) 113 { 114 return null; 115 } 116 117 121 public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node arg) 122 throws org.w3c.dom.DOMException 123 { 124 return null; 125 } 126 127 131 public org.w3c.dom.Node removeNamedItemNS(String namespaceURI, 132 String localName) 133 throws org.w3c.dom.DOMException 134 { 135 return null; 136 } 137 138 } 139 | Popular Tags |