August 12th, 2002, 03:12 AM
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
August 12th, 2002, 05:09 AM
Really short answer: it's HTML's big brother, but instead of marking up content for display, you markup content to give it meaning.
August 12th, 2002, 05:59 AM
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
isn't 'grenate data, read date, and ensure that the data structure is unambiguous' what PHP does with databases?
PHP is fun
August 12th, 2002, 12:16 PM
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.
August 19th, 2002, 02:50 PM
August 20th, 2002, 04:12 PM
I would highly recommend the book:
Professional PHP4 XML
August 23rd, 2002, 11:13 AM
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..
September 1st, 2002, 04:23 AM
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.