Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
3.4 KiB

  1. require 5; # -*-Text-*- Time-stamp: "2001-03-14 20:11:56 MST"
  2. package HTML::Tree;
  3. $VERSION = $VERSION = 3.11;
  4. # This is where the dist gets its version from.
  5. # Basically just a happy alias to HTML::TreeBuilder
  6. use HTML::TreeBuilder ();
  7. sub new {
  8. shift; unshift @_, 'HTML::TreeBuilder';
  9. goto &HTML::TreeBuilder::new;
  10. }
  11. sub new_from_file {
  12. shift; unshift @_, 'HTML::TreeBuilder';
  13. goto &HTML::TreeBuilder::new_from_file;
  14. }
  15. sub new_from_content {
  16. shift; unshift @_, 'HTML::TreeBuilder';
  17. goto &HTML::TreeBuilder::new_from_content;
  18. }
  19. 1;
  20. __END__
  21. =head1 NAME
  22. HTML::Tree - overview of HTML::TreeBuilder et al
  23. =head1 SYNOPSIS
  24. use HTML::TreeBuilder;
  25. my $tree = HTML::TreeBuilder->new();
  26. $tree->parse_file($filename);
  27. #
  28. # Then do something with the tree, using HTML::Element
  29. # methods -- for example $tree->dump
  30. #
  31. # Then:
  32. $tree->delete;
  33. =head1 DESCRIPTION
  34. HTML-Tree is a suite of Perl modules for making parse trees out of
  35. HTML source. It consists of mainly two modules, whose documentation
  36. you should refer to: L<HTML::TreeBuilder|HTML::TreeBuilder>
  37. and L<HTML::Element|HTML::Element>.
  38. HTML::TreeBuilder is the module that builds the parse trees. (It uses
  39. HTML::Parser to do the work of breaking the HTML up into tokens.)
  40. The tree that TreeBuilder builds for you is made up of objects of the
  41. class HTML::Element.
  42. If you find that you do not properly understand the documentation
  43. for HTML::TreeBuilder and HTML::Element, it may be because you are
  44. unfamiliar with tree-shaped data structures, or with object-oriented
  45. modules in general. I have written some articles for I<The Perl
  46. Journal> (C<www.tpj.com>) that seek to provide that background:
  47. my article "A User's View of Object-Oriented Modules" in TPJ17;
  48. my article "Trees" in TPJ18;
  49. and
  50. my article "Scanning HTML" in TPJ19.
  51. The full text of those articles is contained in this distribution, as:
  52. L<HTML::Tree::AboutObjects|HTML::Tree::AboutObjects>
  53. -- article: "User's View of Object-Oriented Modules"
  54. L<HTML::Tree::AboutTrees|HTML::Tree::AboutTrees>
  55. -- article: "Trees"
  56. L<HTML::Tree::Scanning|HTML::Tree::Scanning>
  57. -- article: "Scanning HTML"
  58. Readers already familiar with object-oriented modules and tree-shaped
  59. data structures should read just the last article. Readers without
  60. that background should read the first, then the second, and then the
  61. third.
  62. =head1 SEE ALSO
  63. L<HTML::TreeBuilder>, L<HTML::Element>, L<HTML::Tagset>,
  64. L<HTML::Parser>
  65. L<HTML::DOMbo>
  66. =head1 COPYRIGHT
  67. Copyright 1995-1998 Gisle Aas; copyright 1999-2001 Sean M. Burke.
  68. (Except the articles contained in HTML::Tree::AboutObjects,
  69. HTML::Tree::AboutTrees, and HTML::Tree::Scanning, which are all
  70. copyright 2000 The Perl Journal.)
  71. Except for those three TPJ articles, the whole HTML-Tree distribution,
  72. of which this file is a part, is free software; you can redistribute
  73. it and/or modify it under the same terms as Perl itself.
  74. Those three TPJ articles may be distributed under the same terms as
  75. Perl itself.
  76. The programs and documentation in this dist are distributed in
  77. the hope that they will be useful, but without any warranty; without
  78. even the implied warranty of merchantability or fitness for a
  79. particular purpose.
  80. =head1 AUTHOR
  81. Original HTML-Tree author Gisle Aas E<lt>gisle@aas.noE<gt>; current
  82. maintainer Sean M. Burke, E<lt>sburke@cpan.orgE<gt>
  83. =cut