Hi All,
Im trying to evaluate Xindice for an upcoming project but I have ran into a problem. I cant seem to select an individual attribute.


Using the following XML as an example

<?xml version="1.0" encoding="UTF-8"?>
<test>
<data>
   <line number="1">
       <somedata>data</somedata>
   </line>
   <line number="2">
       <somedata>data</somedata>
   </line>
   </data>

</test>

If I run the following:

xindice xpath -c /db/test -q //[EMAIL PROTECTED]

I get back both elements.

<?xml version="1.0"?>
<line number="1" xmlns:src="http://xml.apache.org/xindice/Query"; src:col="/db/test" src:key="test">
<somedata>data</somedata>
</line>
<?xml version="1.0"?>
<line number="2" xmlns:src="http://xml.apache.org/xindice/Query"; src:col="/db/test" src:key="test">
<somedata>data</somedata>
</line>


If I try to select a single element by its attribute value, using

xindice xpath -c /db/test -q //[EMAIL PROTECTED]"1"]

xindice appears to run ok ( no error messages) but I get no output.

I have tried enclosing the attribute with single quotes and no quotes and still get the same result.

Running the XPath in XML Spy against the xml will return the single match, so im not sure what im doing wrong.

I am using :

Xindice 1.0 (Birthday)
j2sdk1.4.2_01
Windows 2000


Regards, Dan Alford




Reply via email to