uddi namespace does not do trick. --- Vanessa Williams <[EMAIL PROTECTED]> wrote: > miten mehta wrote: > > > Hello, > > > > I am trying to fetch xnode:Body nodes which have > > personName as Miten Mehta. Actually document has > > xnode:Envelope as docelement. I tried various > xpaths > > in api but with no match. Only thing that works > is > > /xnode:Envelope/xnode:Body or //xnode:Body. Body > > content is not taking part in xpath match it > seems. > > > > I am trying to figure out does body content take > part > > in xpath query for soap message documents. > > The default namespace declaration on the > businessentity element may be a > source of trouble. As an experiment, you could give > the uddi namespace a > prefix (say, "uddi"). Make sure to set the xnode and > uddi namespaces for the > XPathQueryService. Then try the query as: > > /xnode:envelope/xnode:body[uddi:businessentity/uddi:contacts/uddi:contact/ud > di:personname = "Miten Mehta"] > > Unfortunately, I don't know how to set a namespace > as the default (having no > prefix) within the XPathQueryService. In any event, > it doesn't *become* the > default namespace until later in the document which > makes it even more > confusing, since you have to set all the namespaces > up front before doing > the query. XPath is just sort of broken when it > comes to namespaces, IMHO. > > It's best to avoid the use of //xnode:body[...], > because its performance is > very poor. > > Good luck, > > Vanessa >
__________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
