[xquery-talk] XQuery question about accessing ancestor/parent nodes of return values

Torsten Grust grust at in.tum.de
Sat May 10 00:28:38 PDT 2008

Hi Steve,

a simple XPath expression appears to be sufficient in this case:

	//Company/Person[Address/Zipcode = "12345"]


On May 9, 2008, at 22:36, Steve Taylor wrote:
> The problem with the results above is that I need to return the  
> entire <Person> (including all sub-nodes) with the matching  
> <Zipcode> string, not just the person’s <Address> node since the  
> <Address> node alone does not tell me who is the matching person.  
> With the results I got back from the XQuery above I only get the  
> <Address> node, and I can’t seem to figure out how to return the  
> entire <Person> node. Here is the expected results I was hoping to  
> receive for this example: [...]

   | Prof. Dr. Torsten Grust                         grust at in.tum.de |
   |                                 http://www-db.in.tum.de/~grust/ |
   |     Database Systems - Technische Universität München (Germany) |

More information about the talk mailing list