|
-
May 16th, 2007, 01:23 AM
#1
Thread Starter
Junior Member
nodes in XML
Code:
XmlDocument doc = new XmlDocument();
doc.Load("contor.xml");
XmlNodeList items = doc.SelectNodes(@"Aparate/Aparat/Pozitii/Pozitie");
foreach (XmlNode node in items)
{
if (node.LocalName == "Pozitie")
{
DataRow dr = dp.NewRow();
dr["Produs"] = node.ChildNodes[0].InnerXml;
dr["ContorInitial"] = node.ChildNodes[1].InnerXml;
dr["ContorFinal"] = node.ChildNodes[2].InnerXml;
dp.Rows.Add(dr);
}
}
i have a DataSet Dset and a DataTable dp
how i put in Dataset the data from DataTable?
now i want to put
Last edited by King Abadon; May 16th, 2007 at 05:24 AM.
-
May 16th, 2007, 01:28 AM
#2
Re: nodes in XML
Please use code tags to make your post more readable.
-
May 16th, 2007, 09:25 PM
#3
Hyperactive Member
Re: nodes in XML
Ok. For things like these i like to take it slow. So first I would extract the data from the xml document and probably print it out to a text box just to make sure that I am getting the data. Second, I would create a table and enter some hard coded values in that table just to make sure that I am entering it the correct way. Finally that last step I would do is to actually add the data that goes from the xml to the text box to the table.
I don't know if this will help you, there seems to be an error, the question is where is that error. When I take things in small steps, if I find an error, I usually also find out where that error is located.
Jennifer.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|