Anonymous - 2017-11-28

Looking at the following simple xml structure:

<testnode a1="1" a2="2">Testdata</testnode>
<testnode a1="2" a2="2">Testdata2</testnode>

How to select the node with attributes a1="2" and a2="2"?

//testnode[@a1="1"][@a2="2"]

is not working as well as

//testnode[@a1="1" and @a2="2"]

What is the correct XPath syntax to use?