#
# $Id: testhtml.icn,v 1.2 2006-07-10 12:55:14 rparlett Exp $
#
# This file is in the public domain.
#
# Author: Robert Parlett (parlett@dial.pipex.com)
#

import xml

procedure main(a)
   local p, fmt, e, f, s, d
   p := HtmlParser()

   fmt := HtmlFormatter()

   every e := !a do {
      f := open(e) | open(e, "m") | stop("couldn't open " || e)
      s := ""
      every s ||:= !f
      close(f)
      d := p.parse(s) | stop("couldnt parse " || e)
      write(fmt.format(d))
      d.print_structure()
      write("------------")
   }
end
