SyntaxFix
Write A Post
Hire A Developer
Questions
This XPath is specific to the code snippet you've provided. To select <child> with id as #grand you can write //child[@id='#grand'].
<child>
#grand
//child[@id='#grand']
To get age //child[@id='#grand']/@age
//child[@id='#grand']/@age
Hope this helps