xml ファイルから入力される DataSet があり、そのメインの DataTable を複数の DataTable に分割したいと考えています。
これがテーブルの形式であるとしましょう:
Column1 | Column2
1234 | 4567
1234 | 1122
1234 | 2233
1000 | 3344
1000 | 5566
上記を 2 つのテーブルに分割する必要があります。
これは私がxmlファイルを読む方法であり、正しく動作します:
WebClient wc = new WebClient();
wc.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
string strXmlString = wc.DownloadString(strUrl); // Download the URL to a string
strXmlString = Regex.Replace(strXmlString, @"m:null.+?>{1}", @"/>"); // Find ' m:null[anything]>' and replace it with '/>'
strXmlString = Regex.Replace(strXmlString, @"[\s]{1}m:.+?>{1}", @">"); // Find ' m:type[anything]>' and replace it with '>'
XmlDocument xDoc = new XmlDocument();
xDoc.LoadXml(strXmlString); // Load the XML String into an XML Doc
XmlReader xReader = new XmlNodeReader(xDoc);
DataSet ds = new DataSet();
ds.ReadXml(xReader); // Upload the XML Doc Data to the DataSet
ds.Tables[0]
を2つのテーブルに分割するにはどうすればよいですか?