in reply to Re^3: Hypertree from HTML file
in thread Hypertree from HTML file

I suppose its actually called a hyperbolic Tree, the prof only refers to it as a hyperTree. It would take in an HTML file and output it in xml tree format which I believe is a representation of a hypertree/Relational Database type format. I think HTML::TreeBuilder might be just what I'm looking for???

Replies are listed 'Best First'.
Re^5: Hypertree from HTML file
by GrandFather (Saint) on Nov 01, 2007 at 00:50 UTC

    Nope. XML is nothing to do with 'hyperbolic Tree' and HTML::TreeBuilder, while a fine tool, probably won't help you much with this problem. Are you expecting to generate a picture or a file? If you expect to generate a file get your prof to generate the file contents that are expected for a simple HTML page.

    My best guess at the moment is that a picture of the form provided by the Java hyperTree object is what is expected. Maybe you should tell us more of the context for this project? in particular, what is to happen with the output?


    Perl is environmentally friendly - it saves trees
      K, now I'm confused. What I need to do is to take an HTML page/file parse it. Take the structure and regurgitate it in a string output to an html or text file. I'll just use HTML. So it would appear in the structure that an xml file appears in with respect to the root node, elements, attributes and so forth. Visually, with the inherent relationships.

        Then I believe you'll have to use the HTML-Tree cpan module which parses a html document to a tree object. You'll also need some xml module if you want to write an xml output.

        Alternately, just use some xhtml tidier, pretending the html is bad xhtml.