Last Modified
2012-04-28 17:00:54 +0000
Requires
  • htree/parse
  • htree/extract_text
  • htree/equality
  • htree/inspect
  • htree/display
  • htree/loc
  • htree/traverse
  • htree/template
  • htree/rexml

Description

htree.rb

HTML/XML document tree

Author

Tanaka Akira <akr@fsij.org>

Features

Example

The following one-liner prints parsed tree object.

% ruby -rhtree -e 'pp HTree(ARGF)' html-file

The following two-line script convert HTML to XHTML.

require 'htree'
HTree(STDIN).display_xml

The conversion method to REXML is provided as to_rexml.

HTree(...).to_rexml

Module/Class Hierarchy

Method Summary

HTree provides following methods.