Wednesday, June 08, 2005

XML is the coolest thing on this planet

I had a class today about my currently favorite subject: XML. It's actually a 7-week spanning subject, but it just keeps getting more fun all the time. Seriously, hear me out though.
So they start off in the first week with the basic stuff: tags, attributes, XHTML. I think ok, that's pretty easy and pretty much well-known by everyone in class. But anyway, no use rocking the boat by telling the teacher to speed it up. More time off means more time to party. But over the course (sp?) of the past few weeks we've been going steps up on the ladder every time - and it just amazes me how much can actually be done with XML. Really, you have no idea. The first revelation we got was the CSS style sheets you could use to make it appear like a normal HTML website. That was pretty cool. But next, we got into XPath which allows you to dynamically reshape the content on your HTML website. Like, when you have a list of people in XML with their names, birth dates, death dates, shoe sizes etc, you can make a table with this info, sorted on any of those properties. Sounds like fun, huh? Yeah I thought so. Anyway, with this XPath you can select a certain node (element) of the XML file, making the exercises incredibly funny with questions such as 'what XPath query selects the birth country of the second Greek author that lived for over a 100 years?'. Seriously, some of these questions had me in stitches.

Then we had the introduction of XSLT stylesheets, which you can use essentially to completely mess up the content of the XML source file and present it as something completely different in HTML, that even validates at the W3C! Amazing.
Now this last week, they've slowly eased into making for-each loops in XSLT stylesheets, using variables, conditional stuff, and this is starting more and more to look like an actual programming language. Mind you, I started this class expecting to do some light HTML coding and ended up learning a whole new programming language. This stuff just blows me away.
Now today, we had some important guy in a business suit give us a lecture about the business equivalent of XML, named XBRL. You can't make this stuff up. According to him, XML is the only way businesses can properly communicate without wasting weeks or even months of time manually reading reports created with Word, only to input them in their own database and create Excel sheets from that. So instead of your tax report taking three months to process and verify, if XBRL would be used, this would take three hours. Well, hook me up and call me Scotty, where can I get some of that?

The W3C really put some effort into this XML standard... and it's only at 1.0! I'm really amazed over and over again by what you can actually accomplish with it. I almost expect them to fully convince me to stop using ASP, PHP, MySQL, C++ and VB next week, only to replace it with one alternative, the one language, the only language, the language that can do everything, the one language to rule them all.... XML!

No comments: