[xml] XPath cursor


I'm new to xml and libxml and was wondering if it's
possible to 'loop' through a XML file.
Suppose I have a XML file like this:

   <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="KDeveloper" version="2.0" />

Is it possible to give me a list of all the software
packages from Microsoft?
I tried something running this statement more than

xmlXPathObjectPtr package_name =
char*)"/SOFTWARE/TYPE/VENDOR[ name='Microsoft']/PACKAGE/@name",

but it shows me only the first package.
How can I show the other ones as well?

Kind regards,

Gerry Jacobs

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

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