php - select node that does not contain any of given nodes -
this xml working on
<root> <person> <name>bob</name> <age>23</age> </person> <person> <name>dina</name> <age>19</age> </person> <person> <name>john</name> <age>31</age> </person> <person> <name>tim</name> </person> </root> here can person name has age attribute with
/person[age]/name this select bob, dina , john
but how select tim?
/root/person[not(age)]/name
that should work.
php xml xpath
No comments:
Post a Comment