Results 1 to 3 of 3

Thread: Do I get the basic theory behind XML?

  1. #1
    Join Date
    May 2005

    Question Do I get the basic theory behind XML?

    Okay let me explain my understanding of why to use XML well one use any way.

    XML is used to define the structure of a document, what the document should contain but not how it is formatted. So XML is sort of a blue print for how other documents such as HTML, text and PDF should be structured and what information they should contain.

    An examle of two ecommerce systems: eshop[a] has a list of products with their prices in an XML file. eshop[b] has set up a deal with eshop[a] to sell eshop[a]'s products on eshop[b]'s website. So using a parser eshop[b] converts the XML file using PHP (or other language) into HTML to display the products and prices that eshop[a] has to offer. Then when eshop[a] updates the XML file the information is automatically updated on eshop[b]'s website.

    Is this how it all works, generally... basically...? Am I right?
    Feel the fear, Summon the courage

    Learn to build a CMS

  2. #2
    Join Date
    Mar 2004
    Your first paragraph sounds like you're describing XML DTD, but XML is more than just a DTD system. Like your second paragraph describes, it can also be a document its self (with or without DTD). It's not just for changing into HTML on other sites though. It can, and often is, used purely to transfer data from one system to another without having to worry about compatability. Like between two otherwise incompatible databases for example.
    I'm thuper, thanks for asking.

    It lives! http://www.stephenphilbin.com/ (Well it kinda' does anyway).
    My portable colour selection tool

  3. #3
    Join Date
    Aug 2004
    I think of XML as a text-based database management system. While it's possible the database you define via XML could simply be a document, it could also be a product inventory, a project calendar, a description of the human genome, or any other data that can be organized in a hierarchical manner. Like any other database, you then have the option of using various methods to extract the particular data that interests you at the moment and format it however you'd like.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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