Xpath retrieving attribute


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
15 views
There are xml of the form

TITLE
TEST
TEST2

As to TITLE, TEST and TEST2 question is not necessary.
TITLE obtained simply TEST and TEST2 using
$xml->xpath('//test:test1');

but how to get at:the attr and attribute using xpath? Or at least attribute? As I understand it you need to using @ but it doesn't work //test:test2@at:attr

Please tell me you're familiar with xpath
by | 15 views

2 Answers

0 like 0 dislike
//test:test2/@at:attr
by
0 like 0 dislike
but it doesn't work //test:test2@at:attr
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 14, 2019 by Shimpanze
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,923 users