You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Tun Lin <ch...@singnet.com.sg> on 2004/05/16 10:23:30 UTC

Querying a document with attribute.

Hi users,

I am trying to query a xml document with attribute with the following query
statement:

xindice xpath -c /db/partsdb -q /parts/part[@sku="101"]

However, no results are obtained.

If I use the following statement,

xindice xpath -c /db/partsdb -q /parts/part/desc

There are some results.

Is this a bug in Xindice?

Hope to hear from anyone of you soon.

Thanks.

Re: Querying a document with attribute.

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Tun Lin wrote:

> Hi users,
>
> I am trying to query a xml document with attribute with the following 
> query statement:
>
> xindice xpath -c /db/partsdb -q /parts/part[@sku="101"]
>
> However, no results are obtained.
>

RTFM:
http://wiki.apache.org/xindice/XindiceFAQ/AttributeValue


Vadim


Re: Querying a document with attribute.

Posted by Jelle Alten <je...@hotmail.com>.
Querying a document with attribute.Hi,

Yes I did, but it wants you to register by entering an email address and password (http://titanium.dstc.edu.au/downloader/Download.do?program=XMLdbGUI&filename=XMLdbGUI_full.zip). If you can't get through that, mail me and I'll help you out there.

I found out XMLdbGUI works fine with Xindice 1.0, but if you want to use it for 1.1 you have to replace some of the jar files by newer ones. Opening xml documents still won't not work, but querying and browsing the collections works fine.
What version are you using, on what platform and what OS?

Jelle

  ----- Original Message ----- 
  From: Tun Lin 
  To: xindice-users@xml.apache.org 
  Sent: Monday, May 17, 2004 4:17 PM
  Subject: RE: Querying a document with attribute.


  Hi Jelle,

  I went to the website http://titanium.dstc.edu.au/xml/xmldbgui/download.shtml but the package XMLdbGUI_full.zip cannot be downloaded. Did you download from this website?

  Hope to hear from you soon.  
------------------------------------------------------------------------------
  From: Jelle Alten [mailto:jelle-Xindice@hotmail.com] 
  Sent: Monday, May 17, 2004 4:04 PM
  To: xindice-users@xml.apache.org; chentun@singnet.com.sg
  Subject: Re: Querying a document with attribute.


  Hi Tun Lin,

  I have the same problem running a query from the commandline. I run Xindice 1.0 with Jetty on a winXP machine. When I run the same query inside a XMLdbGUI window, it works fine. So it could have something to do with either the command-line tool (xindice.bat) or with running queries from the command line, since that might mess up the quotes and so on. I tried using single quotes, no quotes, escapted quotes and so on, but that didn't help much. Queries like /parts/part[@sku] do work, giving all the parts with the attribute sku.

  Did you try running the query from a Java program? If you're not into Java, maybe you can try using the XMLdbGUI program for now, see if that helps a little. BTW, I'm not a XMLdbGUI sponsor ;-) .

  Good luck, hope it helped,

  Jelle

  ----- Original Message ----- 
    From: Tun Lin 
    To: xindice-users@xml.apache.org 
    Sent: Sunday, May 16, 2004 10:23 AM
    Subject: Querying a document with attribute.


    Hi users, 

    I am trying to query a xml document with attribute with the following query statement: 

    xindice xpath -c /db/partsdb -q /parts/part[@sku="101"] 

    However, no results are obtained. 

    If I use the following statement, 

    xindice xpath -c /db/partsdb -q /parts/part/desc 

    There are some results. 

    Is this a bug in Xindice? 

    Hope to hear from anyone of you soon. 

    Thanks. 

RE: Querying a document with attribute.

Posted by Tun Lin <ch...@singnet.com.sg>.
Hi Jelle,
 
I went to the website http://titanium.dstc.edu.au/xml/xmldbgui/download.shtml
but the package XMLdbGUI_full.zip cannot be downloaded. Did you download from
this website?
 
Hope to hear from you soon.  
  _____  

From: Jelle Alten [mailto:jelle-Xindice@hotmail.com] 
Sent: Monday, May 17, 2004 4:04 PM
To: xindice-users@xml.apache.org; chentun@singnet.com.sg
Subject: Re: Querying a document with attribute.


Hi Tun Lin,
 
I have the same problem running a query from the commandline. I run Xindice 1.0
with Jetty on a winXP machine. When I run the same query inside a XMLdbGUI
window, it works fine. So it could have something to do with either the
command-line tool (xindice.bat) or with running queries from the command line,
since that might mess up the quotes and so on. I tried using single quotes, no
quotes, escapted quotes and so on, but that didn't help much. Queries like
/parts/part[@sku] do work, giving all the parts with the attribute sku.
 
Did you try running the query from a Java program? If you're not into Java,
maybe you can try using the XMLdbGUI program for now, see if that helps a
little. BTW, I'm not a XMLdbGUI sponsor ;-) .
 
Good luck, hope it helped,
 
Jelle
 
----- Original Message ----- 

From: Tun  <ma...@singnet.com.sg> Lin 
To: xindice-users@xml.apache.org 
Sent: Sunday, May 16, 2004 10:23 AM
Subject: Querying a document with attribute.


Hi users, 

I am trying to query a xml document with attribute with the following query
statement: 

xindice xpath -c /db/partsdb -q /parts/part[@sku="101"] 

However, no results are obtained. 

If I use the following statement, 

xindice xpath -c /db/partsdb -q /parts/part/desc 

There are some results. 

Is this a bug in Xindice? 

Hope to hear from anyone of you soon. 

Thanks. 


Re: Querying a document with attribute.

Posted by Jelle Alten <je...@hotmail.com>.
Querying a document with attribute.Hi Tun Lin,

I have the same problem running a query from the commandline. I run Xindice 1.0 with Jetty on a winXP machine. When I run the same query inside a XMLdbGUI window, it works fine. So it could have something to do with either the command-line tool (xindice.bat) or with running queries from the command line, since that might mess up the quotes and so on. I tried using single quotes, no quotes, escapted quotes and so on, but that didn't help much. Queries like /parts/part[@sku] do work, giving all the parts with the attribute sku.

Did you try running the query from a Java program? If you're not into Java, maybe you can try using the XMLdbGUI program for now, see if that helps a little. BTW, I'm not a XMLdbGUI sponsor ;-) .

Good luck, hope it helped,

Jelle

----- Original Message ----- 
  From: Tun Lin 
  To: xindice-users@xml.apache.org 
  Sent: Sunday, May 16, 2004 10:23 AM
  Subject: Querying a document with attribute.


  Hi users, 

  I am trying to query a xml document with attribute with the following query statement: 

  xindice xpath -c /db/partsdb -q /parts/part[@sku="101"] 

  However, no results are obtained. 

  If I use the following statement, 

  xindice xpath -c /db/partsdb -q /parts/part/desc 

  There are some results. 

  Is this a bug in Xindice? 

  Hope to hear from anyone of you soon. 

  Thanks.