public interface HTMLSegment
Modifier and Type | Method and Description |
---|---|
WebApplet[] |
getApplets()
Returns the applets found in the page in the order in which they appear.
|
String[] |
getElementNames()
Returns a list of HTML element names contained in this HTML section.
|
HTMLElement[] |
getElementsWithAttribute(String name,
String value)
Returns the HTMLElements found with the specified attribute value.
|
HTMLElement[] |
getElementsWithName(String name)
Returns the HTMLElements found in this segment with the specified name.
|
HTMLElement |
getElementWithID(String id)
Returns the HTMLElement found in this segment with the specified ID.
|
WebForm |
getFirstMatchingForm(HTMLElementPredicate predicate,
Object value)
Returns the first form found in the page matching the specified criteria.
|
WebLink |
getFirstMatchingLink(HTMLElementPredicate predicate,
Object value)
Returns the first link found in the page matching the specified criteria.
|
WebTable |
getFirstMatchingTable(HTMLElementPredicate predicate,
Object criteria)
Returns the first table in the response which matches the specified predicate and value.
|
WebForm[] |
getForms()
Returns the forms found in this HTML segment in the order in which they appear.
|
WebForm |
getFormWithID(String ID)
Returns the form found in this HTML segment with the specified ID.
|
WebForm |
getFormWithName(String name)
Returns the form found in this HTML segment with the specified name.
|
WebImage[] |
getImages()
Returns the images found in the page in the order in which they appear.
|
WebImage |
getImageWithAltText(String source)
Returns the first image found in the page with the specified alt attribute.
|
WebImage |
getImageWithName(String name)
Returns the image found in the page with the specified name.
|
WebImage |
getImageWithSource(String source)
Returns the first image found in the page with the specified src attribute.
|
WebLink[] |
getLinks()
Returns the links found in this HTML segment in the order in which they appear.
|
WebLink |
getLinkWith(String text)
Returns the first link which contains the specified text.
|
WebLink |
getLinkWithImageText(String text)
Returns the first link which contains an image with the specified text as its 'alt' attribute.
|
WebForm[] |
getMatchingForms(HTMLElementPredicate predicate,
Object criteria)
Returns all forms found in the page matching the specified criteria.
|
WebLink[] |
getMatchingLinks(HTMLElementPredicate predicate,
Object criteria)
Returns all links found in the page matching the specified criteria.
|
WebTable[] |
getMatchingTables(HTMLElementPredicate predicate,
Object criteria)
Returns all tables found in the page matching the specified criteria.
|
WebTable[] |
getTables()
Returns the top-level tables found in this HTML segment in the order in which
they appear.
|
WebTable |
getTableStartingWith(String text)
Returns the first table in this HTML segment which has the specified text as the full text of
its first non-blank row and non-blank column.
|
WebTable |
getTableStartingWithPrefix(String text)
Returns the first table in this HTML segment which has the specified text as a prefix of the text
in its first non-blank row and non-blank column.
|
WebTable |
getTableWithID(String ID)
Returns the first table in this HTML segment which has the specified text as its ID attribute.
|
WebTable |
getTableWithSummary(String summary)
Returns the first table in this HTML segment which has the specified text as its summary attribute.
|
TextBlock[] |
getTextBlocks()
Returns the top-level block elements found in the page in the order in which they appear.
|
HTMLElement getElementWithID(String id) throws SAXException
SAXException
- thrown if there is an error parsing the segment.HTMLElement[] getElementsWithName(String name) throws SAXException
SAXException
HTMLElement[] getElementsWithAttribute(String name, String value) throws SAXException
SAXException
String[] getElementNames() throws SAXException
SAXException
WebForm[] getForms() throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebForm getFormWithID(String ID) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebForm getFormWithName(String name) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebForm getFirstMatchingForm(HTMLElementPredicate predicate, Object value) throws SAXException
SAXException
- thrown if there is an error parsing the response.WebForm[] getMatchingForms(HTMLElementPredicate predicate, Object criteria) throws SAXException
SAXException
- thrown if there is an error parsing the response.WebLink[] getLinks() throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebLink getLinkWith(String text) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebLink getLinkWithImageText(String text) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebLink getFirstMatchingLink(HTMLElementPredicate predicate, Object value) throws SAXException
SAXException
- thrown if there is an error parsing the response.WebLink[] getMatchingLinks(HTMLElementPredicate predicate, Object criteria) throws SAXException
SAXException
- thrown if there is an error parsing the response.WebImage[] getImages() throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebImage getImageWithName(String name) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebImage getImageWithSource(String source) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebImage getImageWithAltText(String source) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebApplet[] getApplets() throws SAXException
SAXException
- thrown if there is an error parsing the segment.TextBlock[] getTextBlocks() throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebTable[] getTables() throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebTable getFirstMatchingTable(HTMLElementPredicate predicate, Object criteria) throws SAXException
SAXException
WebTable[] getMatchingTables(HTMLElementPredicate predicate, Object criteria) throws SAXException
SAXException
- thrown if there is an error parsing the response.WebTable getTableStartingWith(String text) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebTable getTableStartingWithPrefix(String text) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebTable getTableWithSummary(String summary) throws SAXException
SAXException
- thrown if there is an error parsing the segment.WebTable getTableWithID(String ID) throws SAXException
SAXException
- thrown if there is an error parsing the segment.Copyright © 2012. All Rights Reserved.