[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Find the Position Index of Elements‏‏

Subject: Re: Find the Position Index of Elements‏‏
From: Philip Fearon <pgfearo@xxxxxxxxxxxxxx>
Date: Mon, 14 Jun 2010 09:30:00 +0100
Re:  Find the Position Index of Elements‏‏
On Mon, Jun 14, 2010 at 12:58 AM, Alice Wei <elite.english@xxxxxxxxx> wrote:
>I am wondering if there is an xpath that could be created so I could
>print out 1, 2, and 3 along with the other text, even though my xml
> don't have 1 indicated here. Is this possible?

So far as I understand your question, the answer is no, its not
possible - not with XPath 1.0.

In my first answer I attempted to explain that in XPath 1.0 you can't
achieve what you need with a single XPath expression.

You must first evaluate one XPath expression that returns the elements
you need, and then in your VB.NET, iterate through those elements, and
on each element use a futher XPath expression to evaluate its

I'm in danger of falling into the pitfall of playing 'guess the
question', that said, if you need output (now or in the future) that's
a bit more meaningful than 'Result 1 Something', and maybe with some
additional formatting you will often be better off with XSLT rather
than a VB.NET XPath solution.

Phil Fearon.

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.