ruby-htmltools, a tree-building HTML parser version 1.01 
Author Message
 ruby-htmltools, a tree-building HTML parser version 1.01

I have written a tree-building HTML parser that is handy for doing
analysis, repair, or transformations of HTML text.

The RAA entry is
http://www.*-*-*.com/

and you can download it at:
http://www.*-*-*.com/

It requires the html-parser library, available from
http://www.*-*-*.com/ ~nahi/Ruby/html-parser/html-parser-19990912p2.ta...

Following immediately on the heels of v1.0, this changes the
following:

* attributes now maintain their order. Though this probably isn't
  strictly necessary under HTML, it may make it easier to compare
  document versions.

* the generated tree now has a top-level node for the document itself,
  so the DTD can be stored. THIS WILL REQUIRE CODE CHANGES if you have
  code that assumes that the root node is always <html>. To find the
  <html> node, you can use the new methods HTMLTreeParser#html() or
  HTMLDocument#html_node():

     html = parser.html()

  Or, querying the tree:

     html = parser.tree.html_node()

* comments are stored in the tree

* added HTMLElement#print_on() to print a (sub)tree to an IO stream

--
Ned Konz
http://www.*-*-*.com/
GPG key ID: BEEA7EFE



Thu, 11 Nov 2004 08:01:22 GMT  
 ruby-htmltools, a tree-building HTML parser version 1.01

Quote:
> -----Original Message-----

> Sent: Saturday, May 25, 2002 4:58 PM
> To: ruby-talk ML
> Subject: [ANNOUNCE] ruby-htmltools, a tree-building HTML parser version
> 1.01

> I have written a tree-building HTML parser that is handy for doing
> analysis, repair, or transformations of HTML text.

I tried to install this, but got this error;

 ... tc_html-element.rb:3:in `require': No such file to load -- test/unit
(LoadError)

I'm using Ruby ruby 1.7.2 (2002-05-16) [i586-linux]

Is there a unit testing module required?

Thanks,

James



Thu, 11 Nov 2004 08:53:21 GMT  
 ruby-htmltools, a tree-building HTML parser version 1.01

Quote:
> I tried to install this, but got this error;

>  ... tc_html-element.rb:3:in `require': No such file to load --
> test/unit (LoadError)
> Is there a unit testing module required?

Oops. Yes, I'm using Test::Unit, which can be gotten from
http://testunit.talbott.ws/

However, for now if you don't have it, just delete the pre-install.rb
script to omit the testing. I'll add a note on this, and/or a check
in pre-install.rb.

I will wrap pre-install.rb in a LoadError handler...

--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



Thu, 11 Nov 2004 09:35:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ruby-htmltools, a tree-building HTML parser

2. ANN: Yapps 1.01 (Parser Generator)

3. Release of Scintilla 1.01 and SciTE 1.01

4. Announce : the join-calculus, version 1.01.

5. Announce : the join-calculus, version 1.01.

6. ANNOUNCE: TKproE version 1.01 released

7. Source: Version 1.01 tkpbiff -- TK Popup Biff

8. New Ruby user / HTML Parser / Module repository

9. Questions building i586-mswin32 version of Ruby

10. Need to build a tree buttom-up (parse tree)

11. Ruby Syntax Highlighting (and a Ruby Parser BUG)

 

 
Powered by phpBB® Forum Software