Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with Hierarchical XML Data
Message
From
20/12/2006 15:30:40
 
 
To
20/12/2006 11:53:50
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
XML
Environment versions
Environment:
VB.NET 1.1
Miscellaneous
Thread ID:
01178848
Message ID:
01179336
Views:
9
Hi,

>Another question relating to this XML file. I am looking at the XPATH string you are using to filter the returned nodes, and I was wondering if there way to filter the dates to dates that are less than today. I have been trying to use this string for the XPATH:
>
>"//G_NEW_DATE[NEW_DATE<'12-10-2006']/BID_CURVE_DATE"
>
>
>but it doesn't seem to find any record. The only thing I can think of is that the xml file can't tell that the field is a date, and therefore can't do a comparison.

AFAIK the 'greater then' and 'less than' operators only compare numeric data. For the comparison process XPATH converts strings to numbers according to some IEEE standard and, since something like '12-10-2006' can't be converted, the comparison fails ('=' and '!=' do work though)

You could maybe select all of the NEW_DATE nodes and then spin through them to locate the one you want then select ../G_BC_CAT from there?....

Or there's the XPATH compare() function - but I've never tried to use it with .NET

Regards,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform