Delphi 2007 Handbook








September 13, 2005

Why XML?

The reasons I like and use XML-related technologies.

As I mentioned in my first post, beside Delphi I'm quite experienced in using XML-based technologies. As most people know me because of my Delphi work, I shuold spend some extra time explaining the rationale for adopting this technology. But I don't have all of the time required, so I'll go for a summary once more.

XML is nothing more than a standard notation for storing and processing data. Calling it a language is quite misnomer. What's nice is that tends to be both machine-readable and human-readable, which is not very common. At the same time, due to the flexibility of its tree-based structure, it can represent complex data, more than many classic tabular representations. XML uses UTF notations to take care of international characters. I saw it once dubbed as the ASCII of year 2000, which I think explains a lot of its value and also of the fact that XML alone is an almost useless building block.

With XML spreading, though, there are more and more tools you can use to work with it, and the fact that there are standard APIs (like DOM and SAX) you can use across programming languages and operating systems makes it easier to write programs that process XML documents. (By the way, there are nice XML tools for Delphi, but that's the topic for another post).

In practice, there are countless applications that support the use of XML, either as the main format or an export format: from OpenOffice to Picasa, from iTunes to Delphi project files, there are very good chances you've encountered XML files.

There are also many XML-based formats: SVG, RSS, XSLT, XML Schema, XSL-FO, XHTML, XForms, SOAP, WSDL, XMl-RPC... . These are technical starndards, but there are also business standards like UDDI, ebXML, and UBL.

Why is it nice to use XML documents instead of other formats? Most of it has to do with the ability to process those documents, for example extracting information by means of XPath expressions, DOM or SAX processing. Moreover, you can transform documents into other XML documents or web pages uswing XSLT, or into PDFs using XSL-FO. Having used all of these technologies (and, again, this web site is an example of XML in action, with all of the pages rendered via XSLT) I have to say they are not easy to use, but very powerful.

So, again, why XML? Imagine all of your data (data documents, text, email, newsmessages, blogs you read and write, spreadsheets, presentations, program listings) easy to manage, transform and process with a single family of universal technologies... and no, I'm not dreaming. I do this more and more, because so many applications provide XML output. If you are not convinced, I'll try to post again on the topic, specifically regarding web development with XSLT and I'll also try to describe the XML architecture behind this site. Stay tuned.





 

5 Comments

Why XML? 

Thanks for the great blogs!

Btw, I have tried to read your blog from Sage 1.3.5
(FireFox extension in FireFox), each of your blog
(post) looks like a wall of text, with no <p>..</p> tags.

Other blogs (for example, Borland Blogging Community)
looks okay, with proper paragrph tags in Sage.

Do you have to fix something or is it the Sage..?

Thanks,
Sarah
Comment by Sarah [] on September 13, 02:10

Why XML? 

Indeed, there is something wrong with RSS.
I'm using Opera and there is no text at all, just 
links to posts.
Comment by Denis on September 13, 14:56

Why XML? 

Why did your blog was showing the whole text in
agregators previously and now only show one line ??? 
Comment by virtualblackfox [http://virtualblackfox.net] on September 13, 16:30

What about tools? 

Marco, thanks for the great blog!

Which XML tools (software) are of your choice? Which 
Delphi components do you use to handle XML-data?

Comment by Mikalai [] on September 22, 02:35

Why XML? 

I mostly use an editor I made bacause it can interact
directly with some backend services, like loading and
saving documents directly from the web server via SOAP.
It has XSLT support and some other goodies. It has
also a web site (http://www.xmltypist.com) where I
hope to load the beta of version 2.0 ASAP.
Comment by Marco Cantù [http://www.marcocantu.com] on September 22, 12:40


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.