|
HTML Parser Home Page | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.htmlparser.util.NodeList
| Constructor Summary | |
NodeList()
|
|
NodeList(Node node)
Create a one element node list. |
|
| Method Summary | |
void |
add(Node node)
|
void |
add(NodeList list)
Add another node list to this one. |
String |
asHtml()
|
String |
asString()
|
void |
copyToNodeArray(Node[] array)
|
Node |
elementAt(int i)
|
SimpleNodeIterator |
elements()
|
NodeList |
extractAllNodesThatMatch(NodeFilter filter)
Filter the list with the given filter non-recursively. |
NodeList |
extractAllNodesThatMatch(NodeFilter filter,
boolean recursive)
Filter the list with the given filter. |
int |
getNumberOfAdjustments()
|
void |
keepAllNodesThatMatch(NodeFilter filter)
Remove nodes not matching the given filter non-recursively. |
void |
keepAllNodesThatMatch(NodeFilter filter,
boolean recursive)
Remove nodes not matching the given filter. |
void |
prepend(Node node)
Insert the given node at the head of the list. |
Node |
remove(int index)
|
void |
removeAll()
|
NodeList |
searchFor(Class classType)
Convenience method to search for nodes of the given type non-recursively. |
NodeList |
searchFor(Class classType,
boolean recursive)
Convenience method to search for nodes of the given type. |
int |
size()
|
Node[] |
toNodeArray()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public NodeList()
public NodeList(Node node)
node - The initial node to add.| Method Detail |
public void add(Node node)
public void add(NodeList list)
list - The list to add.public void prepend(Node node)
node - The new first element.public int size()
public Node elementAt(int i)
public int getNumberOfAdjustments()
public SimpleNodeIterator elements()
public Node[] toNodeArray()
public void copyToNodeArray(Node[] array)
public String asString()
public String asHtml()
public Node remove(int index)
public void removeAll()
public String toString()
public NodeList extractAllNodesThatMatch(NodeFilter filter)
filter - The filter to use.
public NodeList extractAllNodesThatMatch(NodeFilter filter,
boolean recursive)
filter - The filter to use.recursive - If true digs into the children recursively.
- Returns:
- A new node array containing the nodes accepted by the filter.
This is a linear list and preserves the nested structure of the returned
nodes only.
public void keepAllNodesThatMatch(NodeFilter filter)
filter - The filter to use.
public void keepAllNodesThatMatch(NodeFilter filter,
boolean recursive)
filter - The filter to use.recursive - If true digs into the children recursively.public NodeList searchFor(Class classType)
classType - The class to search for.
public NodeList searchFor(Class classType,
boolean recursive)
classType - The class to search for.recursive - If true digs into the children recursively.
|
© 2004 Somik Raha Mar 14, 2004
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||