I have a huge configuration file(xml based), which is frequently updated by the customer. Now i don't want user to make configuration changes directly to the file as user may enter invalid data which can invalidate the file. For now i have a form which
takes inputs from user and then at server side i am using xpath to edit the xml.The UI experience is poor as you can enter multiple child tags to a parent and for each addition there's a postback to server and also it requires a lot of user inputs as to know
where in the dom he wants to add the tags. Is there any way i can represent my xml in html editable form and provide user with dropdowns to select values from and also he can add new tags. I am open to technologies, JS, php, .net , java or any client side
library.
First MANY thanks for your help to contribute to the Community!
Then to be honest,until now xml is used as a datasource hasn't been directly supported by MS with a very nice control,but I think we can export the xml file into the form of DataTable by using DataSet.ReadXml and then bind the DataTable to the GridView,in
the end,we can handle some events of the GridView and do to deal with changes to the DataTable in memory,in the end,what we can do is just call DataSet.WriteXml to export the all data contents into xml file。
If you are interested in this,I'd like to show you my sample;please if possible leave your message and email here……
I have been working on this for a bit now and the best solution for editing xml(when i say best i mean best UI experience) seems to be
XmlGrid which i am using.
And for generating a new XML on basis on user input i have created a UI which allows users to add one or multiple child elements and uses LINQ to XML and xpath.
I am not sure how using GridView we can show and edit hierarchical data .I'd be nice to see some sample and explore more and better possibilities.
I tried this earlier but couldn't foresee if it'd give a good UI experience for editing. Do you know any reference which is somewhat similar to what i am doing?Gridview editing is very powerful, i mean i can also validate using dropdowns in editable region.
It'd be great if i can use a grdview based solution.
Yes,I'm afraid you cannot do that directly with the help of GridView when editing GridView。I'd like to show you my demo within 5 days if you are interested in that,plz leave your email……:)
nijhawan.sau...
All-Star
16432 Points
3174 Posts
Best way to make xml file editable on web
May 17, 2012 11:49 AM|LINK
I have a huge configuration file(xml based), which is frequently updated by the customer. Now i don't want user to make configuration changes directly to the file as user may enter invalid data which can invalidate the file. For now i have a form which takes inputs from user and then at server side i am using xpath to edit the xml.The UI experience is poor as you can enter multiple child tags to a parent and for each addition there's a postback to server and also it requires a lot of user inputs as to know where in the dom he wants to add the tags. Is there any way i can represent my xml in html editable form and provide user with dropdowns to select values from and also he can add new tags. I am open to technologies, JS, php, .net , java or any client side library.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Best way to make xml file editable on web
May 19, 2012 12:24 AM|LINK
Hello Star nijhawan:)
First MANY thanks for your help to contribute to the Community!
Then to be honest,until now xml is used as a datasource hasn't been directly supported by MS with a very nice control,but I think we can export the xml file into the form of DataTable by using DataSet.ReadXml and then bind the DataTable to the GridView,in the end,we can handle some events of the GridView and do to deal with changes to the DataTable in memory,in the end,what we can do is just call DataSet.WriteXml to export the all data contents into xml file。
If you are interested in this,I'd like to show you my sample;please if possible leave your message and email here……
Reguards!
nijhawan.sau...
All-Star
16432 Points
3174 Posts
Re: Best way to make xml file editable on web
May 19, 2012 05:32 PM|LINK
Hello Decker,
I have been working on this for a bit now and the best solution for editing xml(when i say best i mean best UI experience) seems to be XmlGrid which i am using.
And for generating a new XML on basis on user input i have created a UI which allows users to add one or multiple child elements and uses LINQ to XML and xpath.
I am not sure how using GridView we can show and edit hierarchical data .I'd be nice to see some sample and explore more and better possibilities.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Best way to make xml file editable on web
May 20, 2012 01:44 AM|LINK
Hello again:)
Maybe you should try to nest another GridView inside the parent GridView and do data-binding……
nijhawan.sau...
All-Star
16432 Points
3174 Posts
Re: Best way to make xml file editable on web
May 20, 2012 06:51 AM|LINK
Hi Decker,
I tried this earlier but couldn't foresee if it'd give a good UI experience for editing. Do you know any reference which is somewhat similar to what i am doing?Gridview editing is very powerful, i mean i can also validate using dropdowns in editable region.
It'd be great if i can use a grdview based solution.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Best way to make xml file editable on web
May 20, 2012 11:26 AM|LINK
Yes,I'm afraid you cannot do that directly with the help of GridView when editing GridView。I'd like to show you my demo within 5 days if you are interested in that,plz leave your email……:)
nijhawan.sau...
All-Star
16432 Points
3174 Posts
Re: Best way to make xml file editable on web
May 20, 2012 04:35 PM|LINK
This is fine. Thanks for your support.
Email ID: nijhawan.saurabh@gmail.com
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Best way to make xml file editable on web
May 21, 2012 01:06 AM|LINK
Hello:)
I've sent a demo proj for you,:-)
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Best way to make xml file editable on web
May 21, 2012 01:09 AM|LINK
Oh man!
Your Google email somehow rejected to accept my mail,and please use hotmail instead……
^_^
nijhawan.sau...
All-Star
16432 Points
3174 Posts
Re: Best way to make xml file editable on web
May 21, 2012 05:18 AM|LINK
Ok, send it to saurabhnijhawan@hotmail.co.uk
Thanks