1 (** Wrapper around Perl [HTML::TreeBuilder] class.
3 * Copyright (C) 2003 Merjis Ltd.
5 * $Id: pl_HTML_TreeBuilder.ml,v 1.3 2003-10-16 13:41:07 rich Exp $
13 let _ = eval "use HTML::TreeBuilder"
15 class html_treebuilder sv =
18 inherit html_parser sv
21 let sv = call_method sv "elementify" [] in
25 (* Note that "new" is a reserved word, so I've appended an _ character. *)
27 let sv = call_class_method "HTML::TreeBuilder" "new" [] in
28 new html_treebuilder sv
30 let new_from_file filename =
31 let sv = call_class_method "HTML::TreeBuilder" "new_from_file"
32 [sv_of_string filename] in
33 new html_treebuilder sv
35 let new_from_content content =
36 let sv = call_class_method "HTML::TreeBuilder" "new_from_content"
37 [sv_of_string content] in
38 new html_treebuilder sv