Ciao,
I'm working with XPath and I need to retrieve all elements by specific conditions.
Below one example of my XML document:
<?xml version="1.0" encoding="UTF-8"?>
<persone>
<persona>
<nome>Mario</nome>
<cognome>Rossi</cognome>
</persona>
<persona>
<nome>Mario</nome>
<cognome>Bianchi</cognome>
</persona>
<persona>
<nome>Marco</nome>
<cognome>Verdi</cognome>
</persona>
</persone>
I need to create an XPath query that return all elements with these two conditions true:
- The element should contain one element with content equals to "Mario"
- The element should contain one element with content equals to "Bianchi"
How can I achieve this goal?