0

How to select all nodes with rel atrribute starting with "placeholder_"?

In jQuery I achieve it by ( "[rel^='placeholder_']" ) but carrot is not working when I use

$domObj=new Zend_Dom_Query();
          $domObj->setDocument($templateRender);
          $result=$domObj->queryXpath("//*[@rel=^'placeholder_'] " );
paul trmbrth
  • 20,518
  • 4
  • 53
  • 66

1 Answers1

0

Try with the following XPath expression that uses starts-with() function:

"//*[starts-with(@rel, 'placeholder_')]"

W3C XPath string functions

paul trmbrth
  • 20,518
  • 4
  • 53
  • 66