Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8914697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:47:25+00:00 2026-06-15T04:47:25+00:00

How do I modify a value in a XML file using JavaScript/Ajax? I am

  • 0

How do I modify a value in a XML file using JavaScript/Ajax?

I am able to open the XML file with Ajax, and use it’s values in my script, but now I want to send the changes made by my script back to the XML file on the server using Ajax.

It should be possible I think but I can’t find an example to learn from. I have followed a lot of tutorials (also from http://lynda.com), but usually they use data from XML and they dont change it.

I prefer not to use other languages because it’s a very simple script and XML file, containing only 4 fields.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:47:28+00:00Added an answer on June 15, 2026 at 4:47 am

    using javascript you can change the xml values and their attributes of their required nodes.

    first you need to get the required node from the xml either by getElementbyname or using javascript xquery.

    like example check xml from link http://www.w3schools.com/xml/default.asp

    suppose i have value xml_item = that have that xml.

    Like i want to change the value of tag.
    then i do this to change value.
    var element_to = xml.getElementsByName(‘To’)[0];
    //To change its value first detect borwser if it is I.E then use
    element_to.text = “your new value”
    //if it is not i.e then use.
    element.to.textContent = “your new value”;

    //if you want to change property value of element you need to do this.
    element_to.setAttribute(“attibute_name”,”new_value”);

    I hope that you will understand that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to modify an existing XML file using xPath. If the node doesn't
When we want to modify some value in one object we may use two
I have XML file with values expressed in SI unit (m, N). I use
I have a xml file which I want to edit using automatic data binding
I am trying to modify a proprietory XML file using XSL and MSXSL. The
I'm trying to read an existing XML file, modify the InnerText and Attribute values
Can someone please help me with this? I want to modify the xml file
Below is a snippet from my build.xml file. I want to modify the file
I am using the following code to modify the XML file that can be
i declare a global variable and use and modify its value in the function.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.