Wayne saves the day for my XML -> Excel parser

You need to build some experience to get really effective working with XML. I've struggeled with quirks and rarities the past days. Today Wayne Allen solved my final non-trivial problem with SelectSingleNode, XmlNamespaceManger and XPath. Who would beleive that default namespaces wasn't supported? It should at least be documented!

In a couple of hours my solution for continous converting and adding of XML documents to an Microsoft Excel 2002 formatted XML file as new rows is finished.

Basically it uses one XSLT the first time to create the file, worksheets and headers for the XML data. Then another XSLT is used sequentially to add more rows to this excel xml file as my service receives messages. Great and (almost) simple solution for reporting and stats. The only flaw is that I didn't see any way to do this with pure XSLT, so the parsing into the main document has to be done by a C# method (where the XPath problem occured).

No Comments