On 19 May 2004, at 00:24, Jason Kim wrote:
I have added following document to collection /db/description and
tried to test xpath with following queries
- xindice xpath –c /db/description –q /Mpeg7
- xindice xpath –c /db/description –q /Mpeg7/Description
- xindice xpath –c /db/description –q //Label
- xindice xpath –c /db/description –q /*/*
However only the last query returns result and the other return
nothing.
Can someone help me fix my xml doc or my xpath query please ?
<Mpeg7 xmlns="urn:mpeg:mpeg7:schema:2001"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mpeg7="urn:mpeg:mpeg7:schema:2001"
xsi:schemaLocation="urn:mpeg:mpeg7:schema:2001 Mpeg7-2001.xsd">
<Description>
Please RTFM:
http://xml.apache.org/xindice/guide-tools.html#Xpath+Query+Actions
For the following input document:
<node xmlns="urn:test">
<a>
<b>Hello</b>
</a>
</node>
This command line worked just fine for me:
bin\xindice xpath -c /db/test -n test -s "a=urn:test" -q "/a:node/a:a"
Vadim