W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2003

Perl HTML::TIdy usage question

From: Kevin <leinfidel@netscape.net>
Date: Fri, 21 Feb 2003 00:41:28 -0800
Message-ID: <3E55E638.5070603@netscape.net>
To: html-tidy@w3.org

Hi,

I have this compiled and installed on a redhat distribution, latest 
sources as of tonight everything compiles fine.

I'm just trying to set a few options and have it CleanAndRepair a 
string, then return that updated string.

     my $ht = '<html><head></head><body> hi </body></html>';
     $tidy = HTML::Tidy::Document->new();
     # I think 21 = enum TidyXhtmlOut
     $tidy->OptSetBool(21, 1);
     $tidy->ParseString($ht);
     $tidy->CleanAndRepair();

     # Method to get a string back is SaveString????

It segmentations faults everytime on ParseString, obviously I'm doing 
something wrong.  I don't know enough about XS to figure out more from 
Tiny.pm.:(

ps.
Anyone know how to use the enumeration constants, I've tried passing 
them as strings without luck, I guess they work in this latest version

Any suggestions appreciated, thanks!
Kevin
Received on Friday, 21 February 2003 03:57:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:53 GMT