#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    56
    Rep Power
    13

    what is XML exactly?


    reading my PHP book, it did a brief overlook of XML and how to create XML using PHP.....it looked interesting but i'm sort of lost as to what XML is exactly.

    the book says "XML is a new language becoming the standard for transfering data" but what does that mean exactly? is it talking about text files or big programs or something? what does XML do that other language such as Perl and PHP can't do?
    PHP is fun
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Long answer
    Short answer
    Really short answer: it's HTML's big brother, but instead of marking up content for display, you markup content to give it meaning.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    56
    Rep Power
    13
    by saying it is meant to give meaning rather than be displayed are you saying that XML is like a data management sort of thing?

    i read the short answer one and i didn't get it. the only one i think i got was this first point
    1. XML is for structuring data
    Structured data includes things like spreadsheets, address books, configuration parameters, financial transactions, and technical drawings. XML is a set of rules (you may also think of them as guidelines or conventions) for designing text formats that let you structure your data. XML is not a programming language, and you don't have to be a programmer to use it or learn it. XML makes it easy for a computer to generate data, read data, and ensure that the data structure is unambiguous. XML avoids common pitfalls in language design: it is extensible, platform-independent, and it supports internationalization and localization. XML is fully Unicode-compliant.
    isn't 'grenate data, read date, and ensure that the data structure is unambiguous' what PHP does with databases?
    PHP is fun
  6. #4
  7. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    XML is a standardized way to create your own file format. It uses a structure that's similar to HTML (both use <tags>), and it has rules about what a tag looks like, how it works, how to write attributes, etc. However, there are no specific XML tags. That part is up to you, as the developer, to decide.
    Check out http://www.xml.org for some examples and information. Basically, you might write an XML file that was a <list> with a bunch of <item>s in it, and each item has a <name> and a <date> and an <author>.
    You can think of an XML file like a simple database. Most of the databases that php works with use a relational model to store data, while XML is structured. Another difference of course is that you can copy an XML file and use it somewhere else.
    You might have heard of XSL? That's an XML language created for transforming XML documents into other formats (HTML, text, more XML, whatever). But it is XML, it's well-formed, follows all the rules, and has tags specifically defined to do certain tasks.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    9
    Rep Power
    0

    Lightbulb Where you can read about it


    Try:

    http://www.w3schools.com

    and read the XML and XSL pages.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Location
    MD - USA
    Posts
    55
    Rep Power
    13

    xml book


    I would highly recommend the book:

    Professional PHP4 XML


    http://www.amazon.com/exec/obidos/ASIN/1861007213/qid%3D1029874304/sr%3D11-1/ref%3Dsr%5F11%5F1/102-1877817-9734553
  12. #7
  13. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Taos, New Mexico
    Posts
    4
    Rep Power
    0

    PHP 4 XML


    I'd have to second the comments about the PHP 4 XML book - I just got it and so far its been great. Some of the wrox books with multiple authors are rather disjointed, but this one's tied together pretty well..
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Location
    San Jose, CA
    Posts
    58
    Rep Power
    14

    Tid Bit


    XML was created to be a standard way to describe data so any programming language or application can use the data and have 100% control over the presentation.

    In essence it is a way to seperate presentation from date.

    It is almost so simple it becomes very complicated.

    Keep reading.. and playing.
    Thank you,

    Paul B Hepworth

    Questions & Answers http://www.lds.org

IMN logo majestic logo threadwatch logo seochat tools logo