Class jala.HtmlDocument
Object
|
+--jala.HtmlDocument
- class
jala.HtmlDocument
This class provides easy access to the elements of
an arbitrary HTML document. By using TagSoup, Dom4J and Jaxen
even invalid HTML can be parsed, turned into an object tree
and easily be processed with XPath expressions.
Defined in HtmlDocument.js
Constructor Summary |
jala.HtmlDocument
(<String> source)
Construct a new HTML document.
|
Method Summary |
Array
|
getAll(<String> elementName)
Retrieves all elements by name from the document.
|
Array
|
getLinks()
Get all link elements of the HTML document.
|
org.dom4j.tree.DefaultElement
|
scrape(<String> xpathExpr)
Get all document nodes from an XPath expression.
|
String
|
toString()
Get a string representation of the HTML document.
|
jala.HtmlDocument
jala.HtmlDocument(<String> source)
Construct a new HTML document.
Parameters:
source
- The HTML source code.
getAll
Array getAll(<String> elementName)
Retrieves all elements by name from the document.
The returned object structure is compatible for usage
in jala.XmlWriter.
Parameters:
elementName
- The name of the desired element
Returns:
The list of available elements in the document
getLinks
Array getLinks()
Get all link elements of the HTML document.
scrape
org.dom4j.tree.DefaultElement scrape(<String> xpathExpr)
Get all document nodes from an XPath expression.
Parameters:
xpathExpr
- An XPath expression.
toString
String toString()
Get a string representation of the HTML document.
Returns:
A string representation of the HTML document.
Documentation generated by
JSDoc on Tue Jan 8 15:45:31 2008