Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with Hierarchical XML Data
Message
From
13/03/2007 14:13:04
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:
01203104
Views:
15
LOL, I was just going to post the solution I found...

I added the following critera:

and contains(NEW_DATE,'MARKET CLOSED') = false

and it works as intended. Somewhere I saw fn:contains instead of just contains, so that's what I was trying initially when I had my problem.

Thanks!

>Hi,
>Does this work (untested):
>                XmlNodeList nl = xd.DocumentElement.SelectNodes("//G_NEW_DATE[BID_CURVE_DATE='05-DEC-06'and NEW_DATE !='MARKET CLOSED']//G_BC_CAT/*");
>
>
>>>
>>>            XmlDocument xd = new XmlDocument();
>>>            xd.Load("e:\\tmp\\yield.xml");
>>>            XmlNodeList nl =    xd.DocumentElement.SelectNodes("//G_NEW_DATE[BID_CURVE_DATE='05-DEC-06']//G_BC_CAT/*");
>>>            foreach (XmlNode n in nl)
>>>            {
>>>                Console.WriteLine(n.Name + ":" + n.InnerText);
>>>                // Or put in a collection or whatever....
>>>            }
>>>
>>>Regards,
>>>Viv
>>
>>Hey Viv,
>>I am looking at this code again, and do you know of a way to select the nodes with these conditions:
>>-BID_CURVE_DATE='05-DEC-06' AND NEW_DATE doesn't contain 'MARKET CLOSED'? BID_CURVE_DATE and NEW_DATE are in the same node.
>>
>>I found a CONTAINS function but I am not sure exactly how to use it.
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform