Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.meterware.httpunit
Interface HTMLSegment

All Known Implementing Classes:
  TableCell, WebResponse

public interface HTMLSegment

Represents the parse tree for a segment of HTML.

Author:
  Russell Gold

Method Summary
`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.
`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.
`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.

Method Detail

### getForms

    public WebForm[] getForms()
                       throws SAXException

  Returns the forms found in this HTML segment in the order in which they appear.
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getFormWithID

    public WebForm getFormWithID(String ID)
                          throws SAXException

  Returns the form found in this HTML segment with the specified ID.
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getFormWithName

    public WebForm getFormWithName(String name)
                            throws SAXException

  Returns the form found in this HTML segment with the specified name.
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getLinks

    public WebLink[] getLinks()
                       throws SAXException

  Returns the links found in this HTML segment in the order in which they appear.
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getLinkWith

    public WebLink getLinkWith(String text)
                        throws SAXException

  Returns the first link which contains the specified text.
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getLinkWithImageText

    public WebLink getLinkWithImageText(String text)
                                 throws SAXException

  Returns the first link which contains an image with the specified text as its 'alt' attribute.
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getTables

    public WebTable[] getTables()
                         throws SAXException

  Returns the top-level tables found in this HTML segment in the order in which they appear.
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getTableStartingWith

    public WebTable getTableStartingWith(String text)
                                  throws SAXException

  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. Will recurse into any nested tables, as needed.
  Returns:
    the selected table, or null if none is found
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getTableStartingWithPrefix

    public WebTable getTableStartingWithPrefix(String text)
                                        throws SAXException

  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. Will recurse into any nested tables, as needed.
  Returns:
    the selected table, or null if none is found
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getTableWithSummary

    public WebTable getTableWithSummary(String summary)
                                 throws SAXException

  Returns the first table in this HTML segment which has the specified text as its summary attribute. Will recurse into any nested tables, as needed.
  Returns:
    the selected table, or null if none is found
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

### getTableWithID

    public WebTable getTableWithID(String ID)
                            throws SAXException

  Returns the first table in this HTML segment which has the specified text as its ID attribute. Will recurse into any nested tables, as needed.
  Returns:
    the selected table, or null if none is found
  Throws:
    `SAXException` - thrown if there is an error parsing the segment.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD