in reply to Re: Re: XML::Simple problem, or How to convert HTML to Perl and then back again.
in thread XML::Simple problem, or How to convert HTML to Perl and then back again.

Not to sound facetious, but it doesn't get any easier than: print $token->as_is; in TokeParser and print $tree->as_HTML; in TreeBuilder to put it back into HTML form. Start with the right parser, an HTML specific one, and get better results. Remember HTML is not as rigid in it's formatting as XML which makes it flexible but a real pain to parse at times. Using a specialized parser for HTML has many benefits.

Peace

  • Comment on Re: Re: Re: XML::Simple problem, or How to convert HTML to Perl and then back again.

Replies are listed 'Best First'.
Re: Re: Re: Re: XML::Simple problem, or How to convert HTML to Perl and then back again.
by Wonko the sane (Curate) on Jul 11, 2003 at 19:06 UTC
    Your right.

    Maybe HTML::TokeParser::Simple is the right tool I need.
    I missed what you were gtting at the first time.
    I am going to go play with it some more.

    Thank you.
    Wonko