Dim root As XElement = XElement.Load(xmlFile)
Dim stuff =
From item In root.Elements("abc") Select item
Debug.Print(stuff.Count)
and the contents of the XML are:
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<abc xmlns="foo">1</abc>
<abc xmlns="foo">2</abc>
<abc xmlns="foo">3</abc>
</Workbook>
If I remove xmlns="urn:schemas-microsoft-com:office:spreadsheet" the beginning of the the Workbook tag, I get the correct result of 3
ETA What do I do if I have another namespace embedded, in this case "foo"