I have a xml
<MyRoot>
<ITEM>
<Created>Customer created Aug 22 2011 9:28AM
Contact Details Last Updated Aug 22 2011 9:39AM</Created>
<Name>SomeName</Name>
<Address>High way to hell</Address>
<Phone1>123456</Phone1>
<Phone2></Phone2>
<Mobile>654321</Mobile>
<Email>[email protected]</Email>
</ITEM>
</MyRoot>
and it's a value of xdoc ([System.RuntimeType] {System.Xml.Linq.XDocument} System.RuntimeType)
When I execute this:
var items= xdoc.Root.Elements("Item");
i get element of type
{System.Xml.Linq.XContainer+<GetElements>d__11} System.Type {System.RuntimeType}
and with 0 as number of elements.
How can I get collection of items ?