You can use xpath to select a single node.  As an example, I use

<name lname="Stang" fname="Mark" gender="M">
</name>

If I search for gender = 'M',  the xpath query returns the the nodes that
match.
What the Xindice Xpath query returns is a list of keys that match your
query.
At that point you can retrieve the entire document.

HTH,

Mark


Kanarinka wrote:

> Hello All,
> I am also a newbie to xindice and xpath. I am wondering if it is
> possible to use Xpath to select a node without selecting its contents or
> all of its children. We are working on a project that will have elements
> that have sizable chunks of text data as their contents. In certain
> parts of the application we need to be able to represent the entire
> system's hierarchy, but we don't want to pull all of the contents of the
> nodes into memory.
>
> Here's an example:
>
> <lecture>
>         <header>
>                 <id>2</id>
>                 <module_id>8</module_id>
>                 <title> Lecture 1: An introduction to nothing</title>
>         </header>
>         <contents>
>                 Blablahblahblahablahablahablahblah...really long
> contents here
>         </contents>
>         <topic>
>                 <header>
>                         <id>5</id>
>                         <module_id>3</module_id>
>                         <title> Topic 1: An introduction to
> nothing</title>
>                 </header>
>                 <contents>
>
> Blablahblahblahablahablahablahblah...reallyreally long contents here
>                 </contents>
>         </topic>
> </lecture>
>
> In this case, the information that we need to represent the lecture and
> topic nodes visually in our hierarchy lives in the <header> element,
> however in order to preserve the hierarchical representation of the
> <header> element we would like to select something like the following:
>
> <lecture>
>         <header>
>                 <id>2</id>
>                 <module_id>8</module_id>
>                 <title> Lecture 1: An introduction to nothing</title>
>         </header>
>         <topic>
>                 <header>
>                         <id>5</id>
>                         <module_id>3</module_id>
>                         <title> Topic 1: An introduction to
> nothing</title>
>                 </header>
>         </topic>
> </lecture>
>
> Is this possible with Xpath or can you folks think of a better way to do
> this? I apologize if this is very ignorant.
>
> Thanks for any help you can offer!
> catie

Reply via email to