szabgab has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I need to test some HTML files if they contain the expected markup and I thought what if I gave an expected sub-html and then use something (e.g. HTML::TreeBuilder to check if the tree built up from the expected snippet matches some subtree of the received HTML.
This should disregard white space where they are irrelevant and it would disregard the order of attributes inside a tag. So
would be accepted even if it was written<li>text more <a href="..." alt="name">anchor</a></li>
Is this a good idea? What problems will arise? Is there a module already doing something like this?<li> text more <a alt="name" href="...">anchor</a </li>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Comparing HTML snippets
by Tux (Canon) on Feb 28, 2014 at 07:24 UTC | |
Re: Comparing HTML snippets
by chrestomanci (Priest) on Mar 02, 2014 at 17:08 UTC | |
Re: Comparing HTML snippets
by KevinZwack (Chaplain) on Mar 02, 2014 at 14:33 UTC | |
Re: Comparing HTML snippets
by Anonymous Monk on Mar 04, 2014 at 15:04 UTC |
Back to
Seekers of Perl Wisdom