anyone know XPath syntax?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

with all the xml fiends out there there must be someone who has figured this out.

I can use "jobs/job[@sourcedb]" to specify all "job" elements that are children of the "jobs" main element that have the "sourcedb" attribute.
But can I specify more than one attribute, like "jobs/job[@sourcedb AND @destdb]"


?????
 
You just did. The XPAth statement you provided will select all job elements
that are children of jobs that have both a @sourcedb and a @destdb element.
I don't know if it matters, but I believe that the 'and' keyword should be
lower case:

jobs/job[@sourcedb and @destdb]

HTH,
--- Nick

Patty O'Dors said:
with all the xml fiends out there there must be someone who has figured this out.

I can use "jobs/job[@sourcedb]" to specify all "job" elements that are
children of the "jobs" main element that have the "sourcedb" attribute.
But can I specify more than one attribute, like "jobs/job[@sourcedb AND @destdb]"


?????
 
Patty O'Dors said:
with all the xml fiends out there there must be someone who has
figured this out.

I can use "jobs/job[@sourcedb]" to specify all "job" elements that
are children of the "jobs" main element that have the "sourcedb"
attribute.
But can I specify more than one attribute, like "jobs/job[@sourcedb
AND @destdb]"

Yes, I believe that exact syntax will work - although you may have to
put "and" instead of "AND"
 
Back
Top