Hi - I'm fairly new to manipulating xml and I have an excel workbook and on one of the sheets is apparently a listobject... using it's xmlmap.export function I get an xml file that looks like this (truncated of course, you get the idea):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns1:TransactionDetails xmlns:ns1="urn:Microsoft.IT.LicensePosition" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:Trans>
<ns1:Tran>
<ns1:CustomerName>CUNNINGHAM LINDSEY</ns1:CustomerName>
<ns1:UsageCountryName>United States</ns1:UsageCountryName>
<ns1:PartNumber>227-00367</ns1:PartNumber>
</ns1:Tran>
<ns1:Tran>
<ns1:CustomerName>Cunningham Europe</ns1:CustomerName>
<ns1:UsageCountryName>Netherlands</ns1:UsageCountryName>
<ns1:PartNumber>070-01340</ns1:PartNumber>
</ns1:Tran>
</ns1:Trans>
</ns1:TransactionDetails>
I thought I could load the XML string into an XMLDataDocument and get a DataSet out of that, but it's not working. I have:
list.XmlMap.ExportXml(out xmldata);
System.Xml.XmlDataDocument doc = new XmlDataDocument();
doc.LoadXml(xmldata);
DataSet ds = doc.DataSet;
But the resulting dataset has no tables... Is there a simple way I can transform the xml into something that can be interpreted as a dataset?
Thanks in advance,
Sheryl