T
T
TekVanDo2013-12-17 12:05:07
PHP
TekVanDo, 2013-12-17 12:05:07

How to select a value where [@name=] is equal to multiple values?

Tell me how to select a value where [@name=] is equal to several values ​​i.e. something like $xml->xpath('/toolSet/category/tool[@name="rashir"][@name="trubka"]');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Sundukov, 2013-12-17
@TekVanDo

$xml->xpath('/toolSet/category/tool[@name="rashir" or @name="trubka"]');

V
Vit, 2013-12-17
@fornit1917

Maybe this will fit?
stackoverflow.com/questions/5350666/xpath-or-opera...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question