Re: [xsl] (simple?) xpath question

Subject: Re: [xsl] (simple?) xpath question
From: mark bordelon <markcbordelon@xxxxxxxxx>
Date: Fri, 29 Aug 2008 13:12:54 -0700 (PDT)
Thanks, Mozer.

My specifications are very general involving inclusion of the root node with the xpath result. I need to use xpath with asp.net to write a servlet which returns this as xml

So my solution will neccesarily take an xpath expression as servlet input and return the xpath, assumingly needing to go the route of XmlDocument.SelectNodes().



--- On Fri, 8/29/08, mozer <xmlizer@xxxxxxxxx> wrote:

> From: mozer <xmlizer@xxxxxxxxx>
> Subject: Re: [xsl] (simple?) xpath question
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Friday, August 29, 2008, 1:08 PM
> Mark,
> 
> I think I was misunderstanding your question, because I
> undestood that
> you wanted to construct a tree as a result
> 
> The fact is that XmlDocument.SelectNodes() only takes XPath
> 
> So you should follow the path drawn by Colin
> 
> Xmlizer
> 
> On Fri, Aug 29, 2008 at 10:01 PM, mark bordelon
> <markcbordelon@xxxxxxxxx> wrote:
> > Xmlizer, thanks for the quick response!
> >
> > Following your post, is there a simple enough xsl
> solution that could be passed to
> > XmlDocument.SelectNodes(xslstr) to acheive the
> nodelist I want?
> >
> >
> > --- On Fri, 8/29/08, Xmlizer
> <xmlizer+xsllist@xxxxxxxxx> wrote:
> >
> >> From: Xmlizer <xmlizer+xsllist@xxxxxxxxx>
> >> Subject: Re: [xsl] (simple?) xpath question
> >> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >> Date: Friday, August 29, 2008, 12:12 PM
> >> that's not possible to do with XPath only
> >>
> >> But with XSLT you can
> >>
> >> Xmlizer
> >>
> >> On Fri, Aug 29, 2008 at 9:06 PM, mark bordelon
> >> <markcbordelon@xxxxxxxxx> wrote:
> >> > All *help*!
> >> >
> >> > What is the best way to query xml with xpath
> to get a
> >> disjoint nodelist? Specifically i want to include
> just the
> >> root node alongwith a descendent node.
> >> >
> >> > XML:
> >> >
> >> > <a>
> >> > <b>
> >> > <c>
> >> > </c>
> >> > </b>
> >> > </a>
> >> >
> >> > XPATH:
> >> >
> >> > //c
> >> >
> >> > DESIRED RESULT NODELIST:
> >> > i.e. not this:
> >> > <c>
> >> > </c>
> >> >
> >> > but rather this:
> >> > <a>
> >> > <c>
> >> > </c>
> >> > </a>

Current Thread