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 8538671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:10:36+00:00 2026-06-11T11:10:36+00:00

This is what I need: I need to get an XML file from a

  • 0

This is what I need:

I need to get an XML file from a server using the standard code:

if(window.XMLHttpRequest)
    xmlhttp = new XMLHttpRequest();
else
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // For IE6

xmlhttp.open("GET", xml_file, false);
xmlhttp.send();
xmldoc = xmlhttp.responseXML;

After this I need to make some changes to the XML information I received and save it to the server. Is this possible? Can I edit a file client side and send it to a server to replace the old file?

  • 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-11T11:10:38+00:00Added an answer on June 11, 2026 at 11:10 am

    Well, you can but you need a server side script that will accept the file (as a string) and save it.

    You will need a url that will accept the contents of the file and write it on the server:

    //site.com/writeXML.php

    This file will accept the contents of the file(say as file_contents parameter)
    Now you have to send your contents to the file

    //Do something with xmlDoc
    
    if(window.XMLHttpRequest)
      xmlhttp = new XMLHttpRequest();
    else
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // For IE6
      xmlhttp.open("POST", "http://site.com/writeXML.php", false);
      xmlhttp.send("file_contents="+xmlDoc);
    

    On server side, you need to accept the data and write it to the file as follows:

       $contents=$_POST['file_contents'];
       $handle = fopen("/home/user/data/xmlFile.xml, "wb");
       fwrite($handle, $contents);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in need of using classic ASP to create an XML file from
Can I read a XML file from remote server such as http://dealer.somedomain.com/data/inventory.xml I need
For example i have this xml. I need to get value of parameter val
Here in this html i need to get the image name arrow_down using jquery
I need to get the contents from this URL http://google.fr/ok in a NSString can
I need to get UserCarId(int) from this query and assign to int type variable.
I need to get the server's IP address so that this can be sent
I need to get the regular title and regular body from this JSON feed.
I have an XML document that I've received from my server. I need to
Get sunrise time and sun set times from xml from web. This is the

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.