Hi.

I am trying to build simple web application in ASP.NET.
I have xml file with data and xsl file to transform xml file into html doc which will be presented in the browser window and everything is working fine.
What funcionallity do I want?
I want user to enter some text into textboxes and I want this data to be saved into source xml file by clicking for example Save button - I think that it is reversion of transformation process (from html into xml). Can I do something like that? Is it hard to achieve?

regards

>Can I do something like that? Is it hard to achieve?
Yes you do that using methods of DataSet class and it is very easy.

string file=MapPath("~/text.xml");
  DataSet ds = new DataSet();
  DataTable dt = null; 
  if (!System.IO.File.Exists(file))
            {
                // Create an instance of DataTable
                dt = new DataTable("Test");
                dt.Columns.Add("foo");
                dt.Columns.Add("bar");
                ds.Tables.Add(dt);
            }
            else
            {
                ds.ReadXml(file);
                dt = ds.Tables["Test"];
            }
   dt.Rows.Add("value1", "value2");
   ds.WriteXml(file);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.