11 January, 2010
0 Comments
0 categories
If a XML file use namespaces like a Microsoft Excel 2003 XML file, you must use the class XNamespace in you’re LINQ queries for an example see:
http://www.roelvanlisdonk.nl/how-to-read-a-microsoft-office-excel-2003-xml-file-with-linq-in-c/
The Workbook node uses a namespace::
<?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">
</Workbook>
Tags: C#