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.