rose has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I need to validate the html file i.e. check nesting tag.

Please give your valuable comments.

Thanks,
rose

Replies are listed 'Best First'.
Re: How to validate HTML?
by jdtoronto (Prior) on Aug 11, 2006 at 12:55 UTC
Re: How to validate HTML?
by monkey_boy (Priest) on Aug 11, 2006 at 12:51 UTC
Re: How to validate HTML?
by davorg (Chancellor) on Aug 11, 2006 at 12:53 UTC
Re: How to validate HTML?
by GrandFather (Saint) on Aug 11, 2006 at 13:12 UTC

    HTML::Lint is designed to do exactly that.


    DWIM is Perl's answer to Gödel

      The docs for HTML::Tidy say:

      [HTML::Tidy is] meant as a replacement for HTML::Lint. If you're currently an HTML::Lint user looking to migrate, see the section "Converting from HTML::Lint"

      So HTML::Lint isn't deprecated yet... but it sounds like it's heading that way.

      And as they're both owned by the same author, I'm inclined to believe him :-)

      --
      <http://dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

Re: How to validate HTML?
by rsriram (Hermit) on Aug 11, 2006 at 12:52 UTC

    Hi rose, the best option for manipulating HTML data is through using modules. Try these...

    HTML::Parser HTML::SimpleParse HTML::TagParser
    One of this should really solve your purpose.

Re: How to validate HTML?
by lima1 (Curate) on Aug 11, 2006 at 13:00 UTC