Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with Hierarchical XML Data
Message
From
13/03/2007 14:08:29
 
 
To
13/03/2007 12:35:10
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:
01203101
Views:
14
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform