|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.sauronsoftware.grab4j.html.HTMLElement
public abstract class HTMLElement
Base abstract model for HTML elements.
Method Summary | |
---|---|
HTMLDocument |
getDocument()
This method returns the document owner of the element. |
HTMLElement |
getElement(int index)
This method returns a sub-element. |
HTMLElement |
getElementById(java.lang.String id)
This method explores recursively the element children, searching the first occurrence of an element with the given value in its "id" attribute. |
int |
getElementCount()
This method returns the number of the sub-elements owned by the element. |
HTMLElement[] |
getElements()
This method returns an array with the sub-elements. |
HTMLElement[] |
getElementsByAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
This method searches recursively inside the element children, selecting the ones whose have a given attribute with a given value. |
HTMLElement[] |
getElementsByTag(java.lang.String tagName)
This method searches recursively inside the element children, selecting the ones whose name is equal to the given tag name. |
HTMLElement |
getNextElement()
This method returns the next element. |
HTMLElement |
getParentElement()
This method returns the parent element. |
HTMLElement |
getPreviousElement()
This method returns the previous element. |
HTMLElement |
searchElement(Criteria searchCriteria)
This method searches recursively inside the element children and returns the first occurrence of the results list. |
HTMLElement |
searchElement(java.lang.String searchCriteria)
This method searches recursively inside the element children and returns the first occurrence of the results list. |
HTMLElement[] |
searchElements(Criteria searchCriteria)
This method searches recursively inside the element children. |
HTMLElement[] |
searchElements(java.lang.String searchCriteria)
This method searches recursively inside the element children. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public HTMLDocument getDocument()
public HTMLElement getParentElement()
public HTMLElement getNextElement()
public HTMLElement getPreviousElement()
public HTMLElement getElement(int index)
index
- The index of the wanted sub-element, starting from 0 untill
getElementCount() - 1.
public int getElementCount()
public HTMLElement[] getElements()
public HTMLElement getElementById(java.lang.String id)
id
- The id of the wanted sub-element.
public HTMLElement[] getElementsByTag(java.lang.String tagName)
tagName
- The tag name.
public HTMLElement[] getElementsByAttribute(java.lang.String attributeName, java.lang.String attributeValue)
attributeName
- The attribute name.attributeValue
- The attribute value.
public HTMLElement[] searchElements(java.lang.String searchCriteria) throws InvalidCriteriaException
searchCriteria
- The search criteria.
InvalidCriteriaException
- If the given criteria is invalid.Criteria
public HTMLElement searchElement(java.lang.String searchCriteria) throws InvalidCriteriaException
searchCriteria
- The search criteria.
InvalidCriteriaException
- If the given criteria is invalid.Criteria
public HTMLElement[] searchElements(Criteria searchCriteria)
searchCriteria
- The search criteria.
public HTMLElement searchElement(Criteria searchCriteria)
searchCriteria
- The search criteria.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |