The dataSet returned by GetDataSet or GetDataSetEx can be parsed as follows:
string dataSet = string.Empty;
string response = string.Empty;
license.GetDataSetEx(webServiceUrl, "qryLicenseInfo", "ActivationKey='" + activationKey + "'", ref dataSet, out response);
DataSet ds = new DataSet("NewDataSet");
XmlReader reader = new XmlTextReader(dataSet, XmlNodeType.Document, null);
if (!String.IsNullOrEmpty (dataSet))
{
ds.ReadXml(reader);
if ((ds.Tables.Count > 0) && (ds.Tables[0].Rows.Count > 0))
{
DataRowCollection drc = ds.Tables[0].Rows;
if (drc != null)
{
foreach (DataRow dr in drc)
{
string computerKey = dr["computerkey"].ToString();
}
}
}
}
Comments
0 comments
Article is closed for comments.