Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Test::XML::XPath doesn't matchby Ovid (Cardinal) |
on Aug 12, 2009 at 10:33 UTC ( [id://787899]=note: print w/replies, xml ) | Need Help?? |
As far as I can tell, Test::XML::XPath won't let you do this directly. I'm unsure why, but it seems like you really need to find a way to register the XHTML namespace. You'll hate this, but the following monkey patch should makes your test pass:
The caveat is that you have to now use the 'x' prefix with your xpaths. Update:: This assume that you're using XML::LibXML (which I assume you are). like_xpath $html, '/x:html', 'An XHTML document';Cheers,
In Section
Seekers of Perl Wisdom
|
|