htree - HTML/XML tree library
htree provides a tree data structure which represent HTML and XML data.
Feature
-
Permissive unified HTML/XML parser
-
byte-to-byte round-tripping unparser
-
XML namespace support
-
Dedicated class for escaped string. This ease sanitization.
-
HTML/XHTML/XML generator
-
template engine
-
recursive template expansion
-
converter to REXML document
Home Page
Requirements
-
ruby : www.ruby-lang.org/
Download
-
latest release: www.a-k-r.org/htree/htree-0.7.tar.gz
-
development version in CVS repository:
cvs.m17n.org/viewcvs/ruby/htree/ or checkout with:
% cvs -d :pserver:[email protected]:/cvs/ruby co htree
Install
% ruby install.rb
Reference Manual
See rdoc/index.html or www.a-k-r.org/htree/rdoc/
Usage
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
License
Ruby’s
Author
Tanaka Akira <[email protected]>
- packaged as gem- andrew packer <[email protected]>