Dave,
What I need is to have in my hand (or code) a string that contains a
sub-tree of the document (as XML).
Of course I could just parse the document using Xerces and go to the
node I need and serialize this sub-tree to text.
But I want to do this using Xalan because there are other XPath features
I need.

I think that what you are suggesting is selecting all sub-tree nodes
with /A/B//* and then go over the returned NodeRefList and create the
XML text according to the node type (is there a ready made function API
for this common procedure??).

So I'm beginning to understand that xpath can only be used for selecting
a collection of nodes from a document. The result of selected nodes
doesn't refer to their original hierarchy in the DOM document tree. 

Am I right here?



-----Original Message-----
From: David Bertoni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 13, 2007 12:10 AM
To: xalan-c-users@xml.apache.org
Subject: Re: Extracting a sub-tree as text using xpath

Ori Doolman wrote:
> Someone, please?
> 
I think what you mean is that you want the results as markup, and not as

text, in the sense of text nodes in the data model.

Take a look at the SerializeNodeSet sample for more information.

Dave

Reply via email to