Jump to content

Editing & Updating Xml files


navdmk
 Share

Recommended Posts

Hi, Iam an XML newbie here. I have a XML file & can display it contents using XSL file. Now what i want to do is show all elements & 2 of the elements in textboxes & allow the user to edit these and on submiting this form, update those elements in XML file,& again display all these elements. When dispalying the elements in textboxes how do i name them(textboxes),so that on submitting the form i can update the XML file. Pls clarify.Thanks in Advance.

Link to comment
Share on other sites

Hi,  Iam an XML newbie here. I have a XML file & can display it contents using XSL file. Now what i want to do is show all elements &  2 of the elements in textboxes & allow the user to edit these and on submiting this form, update those elements in XML file,& again display all these elements.   When dispalying the elements in textboxes how do i name them(textboxes),so that on submitting the form i can update the XML file. Pls clarify.Thanks in Advance.

Read the article below, it tells how to update XML,XSL files using asp, if you are familiar with asp coding.http://xmlfiles.com/articles/michael/editingxml/default.aspHope this helps.
Link to comment
Share on other sites

You can do something like

<form name="input" action="form_action.asp"method="get">Data: <input type="text" name="user" value="{node-set}"><input type="submit" value="Submit"></form>

Where you must replace "node-set" with an XPath expression to the actual data and "form_action.asp" with a sever side scripting file (not necessary ASP) that would perform the processes for updating the XML. You can't do that with XSLT alone I mean.

Link to comment
Share on other sites

the script you send the form to will just have to open the file, search for something to replace, and replace it with the new value.I would reccomend having a hidden element with the same value, so that the script will know what to replace.LG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...