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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:17:55+00:00 2026-06-02T09:17:55+00:00

I’m working on a small hobby project for personal use, which requires a way

  • 0

I’m working on a small hobby project for personal use, which requires a way to store some values. The three ways of doing this that I could come up with were using: a MySQL db, a XML file or HTML5’s LocalStorage (please post a comment if there are other convenient ways you can think of).

Now since I might want to access the same values from another browser, for instance a mobile device, LocalStorage is clearly not the way to do it. Now when it comes to XML, I know it is only meant as a mean of transporting data, while data storage should be done in MySQL. However, since this is a small project which only would require a XML file of no more than a couple kilobytes, it feels like using XML would be more convenient in this case than setting up a MySQL db. Am I right?

Assuming I want to use XML, how do I append some nodes using a) PHP and b) JQuery or otherwise? Which one do you think is the most convenient way to do it?

I found that there are few well-written examples out there of how to do this (especially with JQuery I wasn’t able to find an example of how to append an XML file in a straightforward way), so it would be awesome if you could attach some sample code for comparison, 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-06-02T09:17:56+00:00Added an answer on June 2, 2026 at 9:17 am

    First of all – jQuery is client side script library. It means that actions performed using jQuery (inc. XML file manipulation) are done on the client side and doesn’t affect the server side. One may say that jQuery can preform actions on the server side, by using AJAX, but in fact it is the server script (php/perl/asp(x)) is the one preforming the action.

    So let’s say that you have a small amount of data that you need to query and update. This can be done by either using “flat” file system or using database.

    1. Using flat files – CSV or XML is the easy option.
      • CSV/XML files can be manipulated using file-get-contents and file_put_contents. If you choose to use XML, you can use the excellent SimpleXML lib ( example based guide can be found here ) Using XML allows you to create advanced date structures,
      • XML together with SimpleXML ( example based guide can be found here ) as awesome. Using XML also allows you to create advanced date structures
      • the downside is that updating the flat files will mean a pretty big security risk as you’ll need to give write permissions to one of the folders of your website, and this usually is bad idea.
    2. DB – MySQL or SQLite (as @garrett-albright sudgested) may seem to be some overkill at first but using SQL is actually going to save you time (as the code will be simpler, you’ll relay on well tested and documented objects) and there are lots of CRUD generators and classes that will do the most of the work for you. With the DB you can use
      • MySQL – great DB, seems to be PHP’s BFF, easy to use very very well documented and usually comes free with hosting packages.
      • SQLite – my weapon of choice in small DB, doesn’t need a service to run, practically zero-configuration DB.
      • Both of the DB options support PDO Which will allow you to write the code one and change databases and platforms freely.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from

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.