I have this XML structure:
<?version="1.0" encoding="ISO-8859-1" ?>
<feed xmlns="http://www.w3.org/2005/Atom" >
<companyinfo>
<addresses>
<address type="mailing" >
<city>NEW YORK</city>
</address>
<address type="business" >
<city>NEW YORK</city>
</address>
<node1>node1</node1>
<node2>node2</node2>
<node3>nod3</node3>
</addresses>
</companyinfo>
</feed>
I want to select all children of <companyinfo>
but exclude addresses
from the result. Meaning my selection becomes all the <nodeX>
.
After reading around and looking at related threads this and this, I came up with the following:
//companyinfo[not(addresses)]
# does not work
//companyinfo/*[not(addresses)]
# does not work
Am I misunderstanding how not(expr)
works?
Am I actually trying to select companyinfo
IF addresses
node is not present?