2011-07-29 31 views
0

我必須將xml文件中的響應加載到數據集中。我已經寫在C#數據集中的重複列

XmlDocument doc = new XmlDocument(); 

doc.LoadXml(Response); 
DataSet ds = new DataSet(); 
ds.ReadXml(new XmlNodeReader(doc)); 
DataTable EquoteRes = ds.Tables["EQuote"]; 

下面的代碼當我調試,我得到這個錯誤:

A column named 'ChildNodes' already belongs to this DataTable: cannot set a nested table name to the same name.

XML文件如下

我怎樣才能擺脫這種錯誤的?

+0

那是什麼語言?請爲您的問題添加正確的標記。 – Mat

+2

你可以附加你正試圖解析的xml嗎? – alun

回答

1

非常類似的討論在asp.net論壇here

而對於更多信息msdn也可以引用。