XPATH - Select all child nodes with a specific attribute
- by David
Hi, what would be the xpath for the following:
Find all child nodes with a specific attibute value but starting from a node with a specific attribute value.
This is kind of related to a question I posted earlier about parsing and rdf xml file - I thought I had solved it but not quite yet.
For example I am trying to parse and grab all of the rdf:about attribute values. I have this working fine. I need to add the following condition though - parsing needs to start after a specific rdf:about value is found.
I am working in php and and using DomDocument and am using the following xpath query: $xpath-query('//@rdf:about') - it is finding all rdf:about attributes fine.
I need to extend this to only find thos attributes that come after the node who rdf:about attribute is equal to something.
Hope this makes sense.