T
timor.super
Hi group,
In my database, I have a table with fields like this :
id | title | xml
------------------------------------
1 | title1 | <datas><data><item name="item1">value1</
item><item name="item2">value2</item></data></datas>
......
I would like to filter my xml data, when it contains a item attribute
named item1
I'm using Linqpad with a request like that :
from i in myTable
where
i.xml.Descendants("data").Element("item").Attribute("name").Value ==
"item1"
select i
but, linqpad tells me that :
'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'
does not contain a definition for 'Element' and no extension method
'Element' accepting a first argument of type
'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'
could be found (press F4 to add a using directive or assembly
reference)
Is this possible ? How to correct it ?
Thanks in advance for any help
In my database, I have a table with fields like this :
id | title | xml
------------------------------------
1 | title1 | <datas><data><item name="item1">value1</
item><item name="item2">value2</item></data></datas>
......
I would like to filter my xml data, when it contains a item attribute
named item1
I'm using Linqpad with a request like that :
from i in myTable
where
i.xml.Descendants("data").Element("item").Attribute("name").Value ==
"item1"
select i
but, linqpad tells me that :
'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'
does not contain a definition for 'Element' and no extension method
'Element' accepting a first argument of type
'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'
could be found (press F4 to add a using directive or assembly
reference)
Is this possible ? How to correct it ?
Thanks in advance for any help