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
<li>text more <a href="..." alt="name">anchor</a></li>
would be accepted even if it was written
<li> text more <a alt="name" href="...">anchor</a </li>
Is this a good idea? What problems will arise? Is there a module already doing something like this?