how dynamic xpath expression

 

Questions


Good day, colleagues!

Tell me please, how to make a dynamic xpath-parsing:

for example, instead of writing

$domXPath->query('//*[(@id = "article-id-18")]');

-> write something like that

$domXPath->query('//*[(@id = "article-id-*")]');

, because in my case, the site’s script generate (every time) a new id for block, that contains article’s text?

So question, is above.

 

 

————————————————-

Answer

xpath

Facebook Comments

Post a comment