This module allows you to assert statements about your XML in the form of XPath statements. You can say that a piece of XML must contain certain tags, with so-and-so attributes, etc. It will try to use any installed XPath module that it knows about. Currently, this means XML::LibXML and XML::XPath, in that order.

NB: Normally in XPath processing, the statement occurs from a context node. In the case of like_xpath(), the context node will always be the root node. In practice, this means that these two statements are identical:

If you are not conversant with XPath, there are many tutorials available on the web. Google will point you at them. The first one that I saw was: http://www.zvon.org/xxl/XPathTutorial/, which appears to offer interactive XPath as well as the tutorials.