name
HtmlTree
import prohtml.*;

HtmlTree htmlTree;

void setup(){
  //enter your url here
  htmlTree = new HtmlTree("http://www.yoururl.com");
  htmlTree.pageTree.printElementTree(". ");

  println("colors:..............."+htmlTree.colors);
  println("pageTree:............."+htmlTree.pageTree);
  println("parentUrlPart:........"+htmlTree.parentUrlPart);
}
description
Object for parsing a valid Html Document to convert its String into a HtmlTree representing its structure. After successful initialisation of the tree you can use different methods and fields to get information of the page.
The Example prints the tree structure of the processing reference page and the values of the fields of the initialised HtmlTree object.
constructors
HtmlTree(url);
HtmlTree(page, url);
HtmlCollection(url);
HtmlCollection(page, url);
parameters
url
String, url to be loaded
page
StringReader, holds the document
url
String, url of the document
url
String
fields
Arraylist holding the colors found in the page
This field holds the treestructure of the parsed document.
Keeps the absolutepart (without file information) of the url of this document.
methods
This method converts the number of descendants of an element of the HTML document, into a float value between 1 and 20.
This methods gives you an ArrayList with Url objects of all Links in the HTML document to other HTML documents.
Use this Method to get the number of all different colors of a HTML document.
GetPageColor gives you a specified color of an HtmlPage.
usage
Web & Application
related