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

  • SEARCH
  • Home
  • 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 6321261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:07:12+00:00 2026-05-24T16:07:12+00:00

I have question on XML Manipulation in PHP. So I have a requirement to

  • 0

I have question on XML Manipulation in PHP.

So I have a requirement to parse a xml file and then display it on the website, these are not difficult. But then, I will need to let the user edit the field in xml in forms. Basically, I grouped the xml file into four tables, each table has add,delete edit functionality.

The way I did it was each time the user submit the form, I open up the XML, read it in using fopen, then find the location for delete, add or edit, then store it as a new file, then delete the original file. This process works ok, but involves lots of I/O handling and if the user do the form update fast, it will simply crush, with the error, file in use or cannot find file or something.

  • 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-24T16:07:13+00:00Added an answer on May 24, 2026 at 4:07 pm

    Why don’t you use simpleXML extension for that purpose? Maybe you should store your xml files in DB :

    CREATE TABLE IF NOT EXISTS `xml` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `file` text NOT NULL,
      `isEditedNow` int(1) NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
    

    So you will just need to read the xml file from table and then (when user will modify it) just update record.

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

Sidebar

Related Questions

I have a question regarding reading an xml file with php. I have a
I have an XML file format that contains a structure of questions: <question id=q101>
I have a question about deserialization. It's a part of xml file <N Name=MyName>Number
I've just begun to tinker with XML, and I have a question. XML File:
So, i have some question about xml Documents in Java. Can i get all
We have a question with regards to XML-sig and need detail about the optional
I have a simple question about Java's XML API and I hope there's a
Question We have a large number of xml configuration files that we want merged
Following on from my recent question regarding parsing XML files in Java I have
My question is the following. I have xml that is versioned by a namespace.

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.