coming across errors in this program
Hi
I have done a program , here The program reads a xml schema file and automatically writes data to a xml file. And it also reads a input xml file and if any field name of this input file and schema file is the same then it loads data from the input xml file and writes into a new xml file.
I have done it and I am coming across some errors. I will paste the part of the program . Please help me to sort out the error.Please say whats wrong in this coding .and please correct it
private void button2_Click(object sender, System.EventArgs e)
{
ArrayList FiledNames = new ArrayList();
ArrayList MatchList = new ArrayList();
XmlTextReader xtr = new XmlTextReader(@"C:\CDEV\testdatagenerator\FIELDNAMES.xml");
while (xtr.Read())
{
switch (xtr.NodeType)
{
case XmlNodeType.Element:
FiledNames.Add(xtr.Name);
break;
}
}
xtr.Close();
XmlDocument xdc = new XmlDocument();
xdc.Load(@"C:\CDEV\testdatagenerator\vw_forecast.xml");
dataSet1.ReadXmlSchema(txtSchema.Text);
foreach (DataTable dTbl in dataSet1.Tables)
{
int i = 0;
object[] oValues = new object[dTbl.Columns.Count];
xdc.Load(@"C:\CDEV\testdatagenerator\FIELDNAMES.xml");
foreach (DataColumn dColmn in dTbl.Columns)
{
for (int y=0; y