A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Thursday, July 24, 2008

Linq to XML - 'where' and '&&' not working?

Hi,

I have this linq statement:

IEnumerable<Room> roomsList = (from room in parent.Descendants("room")
where room.Element("sleeps").Value == "2"
&& room.Element("rate").Element("price").Value != "Full"

the 'parent' bit above is an XElement -

http://xmlfeed.laterooms.com/index.aspx?aid=3998&rtype=7&sdate=2008-07-22&nights=4&hids=149455,124561,4851,92536,85964,121511,7456,3244,142397,87208,145391,145340,88026,147544,91385,71752,73224,4721,1393,100204,93523,72858,69789,149598,86922,149596,89064,73453,84151,72996,66188,100294,100434

from the above ^^

Basically, i want roomsList to have only those rooms, that do not have a price that is "Full"
However, in teh roomsList, there are still "Full" values!!

where am i going wrong?

Alex



Source Click Here.

No comments:

Post a Comment

Post your comments here:

Originals Enjoy