Storing an XML Document in Apache Xindice
Subject:   Searching / WHERE equivalent?
Date:   2006-03-11 19:20:23
From:   noahgreen
(Sorry for previous empty post).
Great article - just a few questions. Does this database allow you to perform queries with a WHERE clause equivalent? That is, something like, "find me all documents whose subject is 'adenine'" or something like that? That would seem to me to be the most important function of any database.


Full Threads Newest First

Showing messages 1 through 3 of 3.

  • Searching / WHERE equivalent?
    2006-03-12 07:49:48  Deepak Vohra | [View]

    Querying in Xindice is performed with XPath.
    An XPath expression retrieves a node or a node set. The query is run in the context of a collection. XPath query does not retrieve documents, but an XPath query is run on all the documents in the specified collection.

    "find me all documents whose subject is 'adenine'"

    A document that is stored as adenine.xml may be retrieved with:
    >xindice rd -c xmldb:xindice://localhost:7001/db/catalog
    -n adenine.xml

    Only one document may be retrieved with rd action.
    • Searching / WHERE equivalent?
      2006-03-13 21:47:56  noahgreen [View]

      This is great - thanks!
  • Searching / WHERE equivalent?
    2006-03-12 07:56:26  Deepak Vohra | [View]

    "find me all documents whose subject is 'adenine'"

    To retrieve all documents with a common subject store the documents in the same collection.
    For example, create a collection called adenine.

    >xindice ac -c xmldb:xindice://localhost:7001/db -n adenine

    Add couments to the collections as explained in the tutorial. List all the documents in the collection with action ld.

    >xindice ld -c xmldb:xindice://localhost:7001/db/adenine