public class DOMAttributeIterator extends java.lang.Object implements NodeIterator
Modifier and Type | Field and Description |
---|---|
private java.util.List |
attributes |
private QName |
name |
private NodePointer |
parent |
private int |
position |
Constructor and Description |
---|
DOMAttributeIterator(NodePointer parent,
QName name)
Create a new DOMAttributeIterator.
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
equalStrings(java.lang.String s1,
java.lang.String s2)
Test whether two strings are == or .equals()
|
private org.w3c.dom.Attr |
getAttribute(org.w3c.dom.Element element,
QName name)
Get the named attribute.
|
NodePointer |
getNodePointer()
Get the NodePointer at the current position.
|
int |
getPosition()
Get the current iterator position.
|
boolean |
setPosition(int position)
Set the new current position.
|
private boolean |
testAttr(org.w3c.dom.Attr attr)
Test an attribute.
|
private NodePointer parent
private QName name
private java.util.List attributes
private int position
public DOMAttributeIterator(NodePointer parent, QName name)
parent
- pointername
- to testprivate boolean testAttr(org.w3c.dom.Attr attr)
attr
- to testprivate static boolean equalStrings(java.lang.String s1, java.lang.String s2)
s1
- first strings2
- second stringprivate org.w3c.dom.Attr getAttribute(org.w3c.dom.Element element, QName name)
element
- to searchname
- to matchpublic NodePointer getNodePointer()
NodeIterator
getNodePointer
in interface NodeIterator
public int getPosition()
NodeIterator
getPosition
in interface NodeIterator
public boolean setPosition(int position)
NodeIterator
setPosition
in interface NodeIterator
position
- the position to settrue
if there is a node at position
.