Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have the following test case:
use strict; use warnings; use Test::More 'no_plan'; use Test::XML::XPath; my $html = <<'END'; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> </head> <body> </body> </html> END like_xpath $html, '/html', 'An XHTML document';
That test fails to match the XHTML. What am I doing wrong and how can I diagnose this in the future? Also, it takes three seconds to fail to match. If I remove the DOCTYPE, it matches instantly. What's happening with that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Test::XML::XPath doesn't match
by Ovid (Cardinal) on Aug 12, 2009 at 10:33 UTC | |
|
Re: Test::XML::XPath doesn't match
by Anonymous Monk on Aug 11, 2009 at 20:22 UTC |