View Full Version : Datapointer/Datapath XPath Support
andy_k_scott
10-30-2003, 09:51 AM
Howdy,
A couple of questions about Datapointer/Datapath and XPath:
The Datapointer documentation states that it supports a subset of the XPath spec. Is there any explicit documentation of this subset?
More specifically, I'm interested in XPath functions (such as position and count) and predicate expressions (other than the simple case of 'data:/foo[1]' I've seen in the doc and examples). Are there are any plans to extend XPath support and include these in the future?
Thanks,
andy
antun
10-30-2003, 10:24 AM
Hey Andy
Right now (version 1.0.2), the subset is quite small - mostly what's mentioned in the data Tutorial and the LZX Reference. Predictate, position and last functions (as well as a couple of others) are scheduled for the next (Krank) release, which is coming fairly soon. There will be a BETA if you're interested.
-Antun
andy_k_scott
10-31-2003, 11:02 AM
Antun,
Thanks for the reply. I'll look forward to these features in the beta.
andy
ankitrastogi
03-20-2006, 08:01 AM
Antun,
I am using last() to get the total no of nodes generated from a dynamic dataset using xpath.
The event where i m want to parse these nodes and filter their data in sequential manner is ondata for this dynamic dataset. The count of nodes ot be parsed can vary on each request.
Each of these nodes will have some attributes and subnodes.My problem how to fetch data of each and every node.
For e.g: here is how my dataset looks like.
And node I want to parse is ReportParameter
code ..........
<dataset name="reportsds" src="http:reports.xml" request="true">
<method event="ondata">
<![CDATA[
var trydp=reportsds.getPointer();
var c1=trydp.xpathQuery("/ReportList/ReportType/Report[@id='"+idval+"']/ReportParameter/last()");
// this gives me no of reportparameter nodes but
// how to parse them
Debug.write(c1);
</method>
</dataset>
<Report id="0">
<version>String</version>
<ReportParameter example="mm-dd-yyyy" content="static" columnname="" tablename="" name="endDate" defaultvalue="">
<paramDataType value="string"/>
<paramType value="single"/>
</ReportParameter>
<ReportParameter example="mm-dd-yyyy" content="static" columnname="" tablename="" name="beginDate" defaultvalue="">
<paramDataType value="string"/>
<paramType value="single"/>
</ReportParameter>
</Report>
Thanks,
Ankit.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.