I'm really getting into this stuff !

Today was my first encounter with XPath and XSLT. I've read a very nice article on gamedev.net, which explains how to employ XML and XSLT to display logging files in a nice way.

I must say that to me (not a big DB expert) XML and XSLT look like a database + SQL at the moment. I mean, XSLTs template and their XPath matchers are like select for data stored in the XML tree. I guess that XML is more versatile, being a tree and not a flat table, but certainly very resource wasting.

The more canonic use of XSLT and XML - generating presentational documents (HTML, for instance) from raw XML data (like HTML). It works nicely - the idea of keeping data in one format and being able to view it in multiple formats is sound and good.

In addition, the article presents some Javascript code to make the web page interactive. Click a button and the Javascript code runs XSLT with different filtering parameters, you get live data refreshing.

Nice ! Being mainly an embedded geek I don't get much in touch with web technologies, but I figure it's good to know at least the basics.


Comments

comments powered by Disqus