puuh ... you want to exclude nodes from the result.
That'S not possible with XPath (as to my knowledge).
In order to preserve the tree structure I would do
your XPath query convert the result to a JDOM element
(http://www.jdom.org) and use the detach() method.
But this is only a workaround :-(

Carsten


Am 07.03.2002 16:42 Uhr schrieb "Kanarinka" unter <[EMAIL PROTECTED]>:

> 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
> 
> 


--

Medizinische Hochschule Hannover                    Fachhochschule Hannover
Abt. H�matologie und Onkologie     FB Informations- und Kommunikationswesen
Carl-Neuberg-Stra�e 1                               Ricklinger Stadtweg 120
30625 Hannover                                               30459 Hannover

                           ++49-511-9296-1650
                    http://summit-bmt.fh-hannover.de





Reply via email to