Quoting "R. Mark Volkmann" <[EMAIL PROTECTED]>: > Quoting "R. Mark Volkmann" <[EMAIL PROTECTED]>: > > > When I run the xpath query "/*" on a collection, it returns all the > documents > > in > > the collection. The name of their root elements is "service". When I run > > the > > query "/service" I get nothing back. How can this be? > > Here's more detail. > > This query returns nothing. > "/[EMAIL PROTECTED]'Weather']/description" > > This query returns the description element. > "/[EMAIL PROTECTED]'Weather']/*[name()='description']" > > It seems that I can't directly use the name of an element in the xpath. > I think this is a namespace problem. > What do I have to do to declare the namespace of the elements in my xpath?
Solved! I have to use -s to specify the namespace. Here's a working query. xindice xpath -c %XDB%/services -q "/p:[EMAIL PROTECTED]'Weather']/p:description" -s "p=http://www.boeing.com/fcs/service" -- R. Mark Volkmann Partner, Object Computing, Inc.