[xml] multiple XPath expressions in one expression


I have a question about XPath. I am not sure if
it can do what I want.
Suppose I have a XML file like this one:

   <TYPE name="office">
      <VENDOR name="Microsoft">
         <PACKAGE name="Office" version="97" />
         <PACKAGE name="Office" version="2000" />
      <VENDOR name="Sun">
         <PACKAGE name="Staroffice" />
      <VENDOR name="Kde">
         <PACKAGE name="KOffice" />
   <TYPE name="development">
      <VENDOR name="Microsoft">
         <PACKAGE name="Visual Studio" version="6.0"
      <VENDOR name="Kde">
         <PACKAGE name="KDevelop" version="2.0"/>

Is it possible to run these 2 xpath expressions in one
xpath expression:
/SOFTWARE/TYPE/VENDOR[ name='Microsoft']/PACKAGE[ name='Office']

I'd like to have a result where I see all the office
products of Microsoft
and all the products of Kde.
I tried some different approaches but didn't succeed
so far.
is XPath able to run such a query?

Thanks in advance,

Gerry Jacobs

Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]