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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:01:02+00:00 2026-05-20T06:01:02+00:00

I am writing to an XML file which is placed in the src directory

  • 0

I am writing to an XML file which is placed in the src directory of my Flex project. But when I run my application, the changes I make to that XML file actually reflects in the copy of that XML file in my C:\wamp\www\myProject-debug\myXML.xml.

Is there a way to reflect those changes to the actual xml file i.e. the one in the src directory?

Server Side: PHP

PHP file is in the same src folder. Here is the related snippet of code:

.
.
$xdoc = new DomDocument("1.0");
$xdoc->Load('myXML.xml');

$xdoc->preserveWhiteSpace = false;
$xdoc->formatOutput = true;

$xcurrUsers=$xdoc->getElementsByTagName('currentUsers')->item(0);
$xuser=$xdoc->createElement('user');
$xcurrUsers->appendChild($xuser);
.
.
$xdoc->save("myXML.xml");
  • 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-05-20T06:01:03+00:00Added an answer on May 20, 2026 at 6:01 am

    You should be able to do so by using a relative or absolute path to where you want to save when you call $xdoc->save(). Since you are currently not providing a path, it is being saved in the current directory.

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

Sidebar

Related Questions

I'm writing an application that loads in records from an XML file and uses
I'm writing an application which processes a lot of xml files (>1000) with deep
I'm currently re-writing a class which handles xml files. Depending on the xml file
What format do I use for Date/Time when writing to an XML file using
I'm having a problem writing Norwegian characters into an XML file using C#. I
I'm writing some code that handles logging xml data and I would like to
I'm writing an application in JSF 2.0 which supports many languages, among them ones
I need to set a property in maven pom.xml file which should be a
on my server i've got an xml file for each client which holds the
I'm writing a class called Category which has 2 static methods for retreiving XML

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.