$auto = $story->element->child('search_auto');
Which would have to change to:
$auto = $story->element->child('search_auto_container')->child('search_auto');
This would have sucked because that element is used all over the element set. But thanks to Class::XPath the code was:
($auto) = $story->element->match('//search_auto');
This will work no matter where the 'search_auto' element is in the tree, so no change is needed! How cool is that?
-sam
The power of Class::XPath revealed 0 Comments More | Login | Reply /