Jump to content
Sign in to follow this  
navdmk

Editing & Updating Xml files

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...