public string[,] GetXMLArray(string xmlFileName)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlFileName);
XmlNode xn = xmlDoc.SelectSingleNode("Details");
XmlNodeList xnl = xn.ChildNodes;
ArrayList arrList = new ArrayList();
int nodeCount = xn.ChildNodes.Count;
string[,] arrXml = new string[nodeCount, 2];
string strAllValue = "";
string keyword = "";
string keywordValue = "";
int pos = 0;
foreach (XmlNode xnf in xnl)
{
arrList.Add(xnf.Name.ToString() + "&" + xnf.InnerText.ToString());
}
for (int i = 0; i < arrList.Count; i++)
{
strAllValue = arrList[i].ToString();
pos = strAllValue.IndexOf("&");
keyword = strAllValue.Substring(0, pos).ToString();
keywordValue = strAllValue.Substring(pos + 1).ToString();
arrXml[i, 0] = keyword;
arrXml[i, 1] = keywordValue;
}
return arrXml;
}
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlFileName);
XmlNode xn = xmlDoc.SelectSingleNode("Details");
XmlNodeList xnl = xn.ChildNodes;
ArrayList arrList = new ArrayList();
int nodeCount = xn.ChildNodes.Count;
string[,] arrXml = new string[nodeCount, 2];
string strAllValue = "";
string keyword = "";
string keywordValue = "";
int pos = 0;
foreach (XmlNode xnf in xnl)
{
arrList.Add(xnf.Name.ToString() + "&" + xnf.InnerText.ToString());
}
for (int i = 0; i < arrList.Count; i++)
{
strAllValue = arrList[i].ToString();
pos = strAllValue.IndexOf("&");
keyword = strAllValue.Substring(0, pos).ToString();
keywordValue = strAllValue.Substring(pos + 1).ToString();
arrXml[i, 0] = keyword;
arrXml[i, 1] = keywordValue;
}
return arrXml;
}