I'm not sure what you're trying to do, but...

If you want to return all the personname elements, try this:

/xnode:body/businessentity/contacts/contact/personname

If you want to return all the xnode:body elements in which personname =
"Miten Mehta", try this:

/xnode:body[businessentity/contacts/contact/personname = "Miten Mehta"]

If you're using the command-line tool, the namespace prefixes may cause you
grief. See yesterday's discussion for workarounds.


Vanessa

miten mehta wrote:

> Hello,
> 
> I am trying to understand how to query xindice with
> xpath correctly. 
> 
> I have with jaxr submitted data into xindice.
> 
> I am able to retrieve it using its key and xindice and
> also using query as //xnode:Body as snippet below.
> 
> Body I suppose has wsdl related stuff. can I query on
> wsdl stuff elements like here is its snippet and I
> would like to query on personName.  I tried but does
> not return any data.
> 
> <?xml version="1.0"?><xnode:Body
> xmlns:src="http://xml.apache.org/xindice/Query";
> src:col="/db/uddi"
> src:key="ee83d361-51ee-83d3-6a1d-83c7f78cb5ae"
> xmlns:xnode="http://www.apache.org/xnode/1.0/";><businessEntity
> authorizedName="testuser"
> businessKey="ee83d361-51ee-83d3-6a1d-83c7f78cb5ae"
> operator="Sun Microsystems Inc."
> xmlns="urn:uddi-org:api_v2"><discoveryURLs><discoveryURL
> useType="getUrl">http://localhost:8080/registry-server/businessEntity?business
> Key=ee83d361-51ee-83d3-6a1d-83c7f78cb5ae</discoveryURL></discoveryURLs><name
> xml:lang="en">Miten Software</name><description
> xml:lang="en">Software
> People</description><contacts><contact><description
> xml:lang="en" /><personName>Miten
> Mehta</personName><phone useType="">630 540
> 2307</phone><email>[EMAIL 
> PROTECTED]</email></contact></contacts><businessServi
> ces><businessService
> businessKey="ee83d361-51ee-83d3-6a1d-83c7f78cb5ae"
> serviceKey="ee83d361-51ee-83d3-c9bc-bac2adc271b"><name
> xml:lang="en" /><description xml:lang="en">Address
> Table Row
> count</description><bindingTemplates><bindingTemplate
> bindingKey="ee83d361-51ee-83d3-beb9-e1e20bbcf89f"
> serviceKey="ee83d361-51ee-83d3-c9bc-5bac2adc271b"><description
> xml:lang="en">Get Row Count of
> tblAddress</description><accessPoint
> URLType="http">http://localhost:9080/dataentry/address/AddressIF</accessPoint>
> <tModelInstanceDetails
> /></bindingTemplate></bindingTemplates><categoryBag
> /></businessService></businessServices><identifierBag
> /><categoryBag><keyedReference keyName="Java Software"
> keyValue="007"
> tModelKey="uuid:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2"
> /></categoryBag></businessEntity></xnode:Body>
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com

Reply via email to