Switch to using XPath for finding DOM nodes.