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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:55:00+00:00 2026-05-23T00:55:00+00:00

I am working with XML on a site and each time I run a

  • 0

I am working with XML on a site and each time I run a script to update the XML file, I have to change the subdomain (I’ve gone from “” to “www” to “fdasekjlfw” and so on) to have the refresh do anything. After about an hour, the update is seen regardless of the subdomain.

I’m wondering if I’m doing something incorrectly. It doesn’t seem right to have to do this each time.

My web host is FatCow and the script was in PHP, if that helps.

Thanks

ADDITIONAL INFO:

I spoke with a fellow that uses the same server (different site though). He says he’s had the exact same problem periodically when updating a MySQL db, and usually when changing an external CSS file (but not always). The scripts for both his and mine are PHP (no scripting with the CSS files though).

In my case, submitting a form sends about 4 files (images) and 10 variables to the script. I’m using the DOMDocument class to remove, add, and update. Here is one of the scripts used (they are all independent, but the same problem arises).

<?php

## Deletes shirt row ##

$delMark = $_GET['href'];
$doc = new DOMDocument; 
$doc->load('../xml/shirts.xml');
$docRoot = $doc->documentElement;

$shirts = $docRoot->getElementsByTagName('shirt');

$nodeToRemove = null;

// find the delete marker
foreach ($shirts as $domElement)
{   
  $attrValue = $domElement->getAttribute('href');

  if ($attrValue == $delMark) 
  {
    $nodeToRemove = $domElement;
    break;
  }

}

if ($nodeToRemove != null)
    $docRoot->removeChild($nodeToRemove);

// save to XML file
$fp = fopen("../xml/shirts.xml", wb);
fwrite($fp, $doc->saveXML());
fclose($fp);

?>

Thank you

  • 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-23T00:55:01+00:00Added an answer on May 23, 2026 at 12:55 am

    I know that XML files are usually cached in the browser. So the script is probably doing its job, but the XML is not being reloaded because of that. Perhaps you can change the script to append a querystring to the XML file, which should force a refresh (untested, so I am not sure this works). For example (although with css): Force refresh of cached CSS data

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

Sidebar

Related Questions

I’m working on a site In that site some pages gets data from XML
Am working on a project that requires uploading xml file to remote FTP site.
I am working migrating a clients site to xml/xsl, they have two HTML Doctypes
I'm working with XML data from an application where we get XML like this:
I have been working with XML for a while now, but some things I
XSLT available is 1.0. I'm working on a dual-language site in an XML-based CMS
I have a Wordpress site that I am currently working on and have set
I'm currently working on a website that imports XML data that we download from
I'm working on the Tabs example from Google Android Developers site (http://developer.android.com/resources/tutorials/views/hello-tabwidget.html) but I'm
I'm building a site that uses tweets from Twitters public timeline. http://twitter.com/statuses/public_timeline.xml I don't

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.