Results 1 to 5 of 5

Thread: PHP and XML

  1. #1
    Join Date
    Nov 2007
    Posts
    151
    Thanks
    67
    Thanked 0 Times in 0 Posts

    Default PHP and XML

    Hi

    What are the advantages of working with XML and not with regular databases?

    I'm a bit new to it and I consider learning it..
    Last edited by d-machine; 07-16-2008 at 11:35 AM.

  2. #2
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    Any programming language can read XML without a middleman. A database must be read by SQL and a server language (e.g. PHP), which can be acting as a middleman for JavaScript. XML is also more flexible than a database, but (I believe) at the expense of efficiency.

    In an old project of mine which I still intend to finish, I need the app's configuration data available to all the arms. As I recall, it has 3 arms: JavaScript; the server language; and the server's operating system. I decided to use XML to keep track of the configuration, even though the app's ultimate data is stored in a database.
    Last edited by Jesdisciple; 07-16-2008 at 03:11 PM.

  3. The Following User Says Thank You to Jesdisciple For This Useful Post:

    d-machine (07-16-2008)

  4. #3
    Join Date
    Nov 2007
    Posts
    151
    Thanks
    67
    Thanked 0 Times in 0 Posts

    Default

    thank you

  5. #4
    Join Date
    Jul 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I use XML so that multiple languages can access the data quickly - which is why it was created.

    Jesdisciple's explanation was great.

  6. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    What about JSON which is lighter than XML?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •