java.lang.Object
gnu.xml.dom.html2.DomHTMLCollection
- All Implemented Interfaces:
- org.w3c.dom.html2.HTMLCollection, org.w3c.dom.html2.HTMLOptionsCollection, org.w3c.dom.traversal.NodeFilter, org.w3c.dom.NodeList
- class DomHTMLCollection
- extends java.lang.Object
- implements org.w3c.dom.html2.HTMLCollection, org.w3c.dom.html2.HTMLOptionsCollection, org.w3c.dom.NodeList, org.w3c.dom.traversal.NodeFilter
An HTML element collection.
| Fields inherited from interface org.w3c.dom.traversal.NodeFilter |
FILTER_ACCEPT, FILTER_REJECT, FILTER_SKIP, SHOW_ALL, SHOW_ATTRIBUTE, SHOW_CDATA_SECTION, SHOW_COMMENT, SHOW_DOCUMENT, SHOW_DOCUMENT_FRAGMENT, SHOW_DOCUMENT_TYPE, SHOW_ELEMENT, SHOW_ENTITY, SHOW_ENTITY_REFERENCE, SHOW_NOTATION, SHOW_PROCESSING_INSTRUCTION, SHOW_TEXT |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
doc
final DomHTMLDocument doc
root
final org.w3c.dom.Node root
nodeNames
java.util.List nodeNames
attributeNames
java.util.List attributeNames
results
java.util.List results
DomHTMLCollection
DomHTMLCollection(DomHTMLDocument doc,
org.w3c.dom.Node root)
addNodeName
void addNodeName(java.lang.String name)
addAttributeName
void addAttributeName(java.lang.String name)
acceptNode
public short acceptNode(org.w3c.dom.Node n)
- Description copied from interface:
org.w3c.dom.traversal.NodeFilter
- Test whether a specified node is visible in the logical view of a
TreeWalker or NodeIterator. This function
will be called by the implementation of TreeWalker and
NodeIterator; it is not normally called directly from
user code. (Though you could do so if you wanted to use the same
filter to guide your own application logic.)
- Specified by:
acceptNode in interface org.w3c.dom.traversal.NodeFilter
acceptName
private boolean acceptName(java.lang.String name)
acceptAttributes
private boolean acceptAttributes(org.w3c.dom.NamedNodeMap attrs)
getNamedItem
private org.w3c.dom.Node getNamedItem(org.w3c.dom.NamedNodeMap attrs,
java.lang.String name)
- Case-insensitive version of getNamedItem.
evaluate
void evaluate()
getLength
public int getLength()
- Description copied from interface:
org.w3c.dom.html2.HTMLCollection
- This attribute specifies the length or size of the list.
- Specified by:
getLength in interface org.w3c.dom.html2.HTMLCollection
setLength
public void setLength(int length)
- Description copied from interface:
org.w3c.dom.html2.HTMLOptionsCollection
- This attribute specifies the length or size of the list.
- Specified by:
setLength in interface org.w3c.dom.html2.HTMLOptionsCollection
item
public org.w3c.dom.Node item(int index)
- Description copied from interface:
org.w3c.dom.html2.HTMLCollection
- This method retrieves a node specified by ordinal index. Nodes are
numbered in tree order (depth-first traversal order).
- Specified by:
item in interface org.w3c.dom.html2.HTMLCollection
namedItem
public org.w3c.dom.Node namedItem(java.lang.String name)
- Description copied from interface:
org.w3c.dom.html2.HTMLCollection
- This method retrieves a
Node using a name. With [HTML 4.01]
documents, it first searches for a Node with a matching
id attribute. If it doesn't find one, it then searches
for a Node with a matching name attribute,
but only on those elements that are allowed a name attribute. With [XHTML 1.0]
documents, this method only searches for Nodes with a
matching id attribute. This method is case insensitive
in HTML documents and case sensitive in XHTML documents.
- Specified by:
namedItem in interface org.w3c.dom.html2.HTMLCollection