RE: [PHP] PHP and XML?
| From: | Krznaric Michael | Date: | Thu, 31 Aug 2000 13:10:17 +0000 |
| Subject: | RE: [PHP] PHP and XML? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-14576@lists.php.net to get a copy of this message | ||
I'm not going to bother quoting everyone in this thread. Being
fairly new to XML and trying to get a grasp of whats going on I can identify
with the original question. Something along the lines of "I hear all the
hype about XML but really I don't see how it'll make my life easier? Its
only another way of marking up data!"
Right now I'm reading a WROX book called XSLT, excellent book if
you're interested in doing stuff with your XML documents and not just
creating them. The book has a very usefull analogy between XML and SQL.
This is my personal take on what i read and should help people comprehending
XML. It sure helped me.
The author recalls the way they use to get data out of a database
before SQL came along. I'm too young but I can only imagine it was a pain.
In relational databases we store data in tables. This is very nice, but if
we don't have some higher language to extract this data in a meaningfull and
declarative way than our tables are useless (or at least very hard to work
with). So when SQL came around it revolutionalized the whole RDBMS scene.
Similarily with XML the data is just stored there in some file, but if we
don't have an easy way of getting at the data and doing things with it then
it's pretty much useless. Similarly like we have SQL to retrieve data from
tables, we have something called XPath expressions and XSLT to maniplate our
XML data. XSLT is a language used to transform a particular XML document
into various other formats.
So, in conclusion, XML by itself seems to be pretty useless to me.
Just as a set of database tables would be without SQL. I found this analogy
wery usefull in comprehending this whole XML "thing". Additionally, I
apologize for the digresion.
Mike