public class HTMLAnchorUtil extends HTMLNodePath {
public final void searchAnchors(HTMLNode node, List<HTMLNode> anchors) {
NodeIterator iterator = node.iterator();
while(iterator.hasNext()) {
HTMLNode n = iterator.next();
if (n.isNode(Name.A)) {
Attributes attrs = n.getAttributes();
Attribute attr = attrs.get("name");
if (attr != null) anchors.add(n);
}
}
}