Click here to Skip to main content
16,005,473 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionOught to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 8:13
Scott_Roberts17-Aug-06 8:13 
AnswerRe: Ought to be basic, but I'm not getting it! Pin
led mike17-Aug-06 9:06
led mike17-Aug-06 9:06 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 10:01
Scott_Roberts17-Aug-06 10:01 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
led mike17-Aug-06 10:53
led mike17-Aug-06 10:53 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 12:46
Scott_Roberts17-Aug-06 12:46 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 13:17
Scott_Roberts17-Aug-06 13:17 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 16:17
Scott_Roberts17-Aug-06 16:17 
QuestionPosition in a node set Pin
whozurmommy16-Aug-06 21:11
whozurmommy16-Aug-06 21:11 
Like many here, I'm new to XML, so please excuse me if I use the wrong terminology:

My XML document (and XMLDataSource) is this:


<gpx>
<trk> <number>1
<trkseg> <trkpt lat="45" lon="-122"> <ele>85

<trkpt lat="45" lon="-122.6"> <ele>84

<trkpt lat="45" lon="-122.7"> <ele>82



I'm using an XPath statement ("XPath="gpx/trk/trkseg/trkpt") to bind all the trkpt elements to my data source. My goal is to return a page that displays all of the ELE data points, and numbers them according to their position in the XML file. It should read something like this:

ele = 85, position = 1
ele = 84, position = 2
ele = 82, position = 3

My DataList control correctly identifies all of the 'ele' elements using this syntax <%# XPath("ele") %>, however I have not be able to figure out how to find the position within my dataset. Using <%# XPath("position()") %> always returns 1, and everything else I have tried either returns the same number or throughs an exception. Can anyone clue me in as to what black magic is required to have XPath (I'm assuming its XPath) return its location within a series of identical elements?

-=STZ=-
AnswerRe: Position in a node set Pin
Dustin Metzgar17-Aug-06 5:51
Dustin Metzgar17-Aug-06 5:51 
GeneralRe: Position in a node set Pin
whozurmommy17-Aug-06 8:41
whozurmommy17-Aug-06 8:41 
GeneralRe: Position in a node set Pin
Dustin Metzgar17-Aug-06 9:18
Dustin Metzgar17-Aug-06 9:18 
GeneralRe: Position in a node set Pin
whozurmommy17-Aug-06 18:58
whozurmommy17-Aug-06 18:58 
QuestionWhy it can't work wih "__uuidof(MSXML2::DOMDocument60)"? Pin
Eric Vonjacson15-Aug-06 21:21
Eric Vonjacson15-Aug-06 21:21 
QuestionXML node insertion Pin
biaali15-Aug-06 4:36
biaali15-Aug-06 4:36 
AnswerRe: XML node insertion Pin
Dustin Metzgar15-Aug-06 5:09
Dustin Metzgar15-Aug-06 5:09 
QuestionNew to XML Pin
lehya14-Aug-06 5:17
lehya14-Aug-06 5:17 
AnswerRe: New to XML Pin
Dustin Metzgar14-Aug-06 8:57
Dustin Metzgar14-Aug-06 8:57 
GeneralRe: New to XML Pin
lehya14-Aug-06 10:31
lehya14-Aug-06 10:31 
GeneralRe: New to XML Pin
Dustin Metzgar14-Aug-06 11:00
Dustin Metzgar14-Aug-06 11:00 
GeneralRe: New to XML [modified] Pin
manowj18-Aug-06 22:38
manowj18-Aug-06 22:38 
AnswerRe: New to XML Pin
Dustin Metzgar22-Aug-06 11:13
Dustin Metzgar22-Aug-06 11:13 
QuestionMS Access 2003 and Exporting in a XML Format Pin
sweep12314-Aug-06 3:53
sweep12314-Aug-06 3:53 
AnswerRe: MS Access 2003 and Exporting in a XML Format Pin
Stephen McGuire14-Aug-06 15:18
Stephen McGuire14-Aug-06 15:18 
QuestionAccess violation exception while trying to create a XML Element Pin
adidas.levy12-Aug-06 22:52
adidas.levy12-Aug-06 22:52 
AnswerRe: Access violation exception while trying to create a XML Element Pin
led mike15-Aug-06 6:03
led mike15-Aug-06 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.