Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working with Hierarchical XML Data
Message
De
20/12/2006 15:30:40
 
 
À
20/12/2006 11:53:50
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
XML
Versions des environnements
Environment:
VB.NET 1.1
Divers
Thread ID:
01178848
Message ID:
01179336
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform