By now I'm sure you're probably using XML files for something. Whether it be data transfer,
storage, caching, or something else altogether, it's a great technology. Anyway, my point
is that you've probably got a few XML files lying around your website. While XML
is designed to be human readable as much as it is machine readable, sometimes it's nice to
look at something without the <>'s.
This little script will take an XML file and an XSL file and combine them to produce whatever
output you want. The sample files (xmlxsl.xml and xmlxsl.xsl)
contain a copy of some of our fake sample data and convert it to a basic HTML table, but you
can use the same code to transform your data into whatever you want... just change the stylesheet.
Here is the pure file (complete with pseudo XML comments) - I'll write up a
little guide to the code if you like it. It's not doing anything special, but
I don't think I've noticed anything quite like it being posted before.
No Chris... Thank You! I sure many of our users will find the functions extremely
helpful. Oh and speaking of the functions, here they are: server-xml.zip (1 KB).
Like Chris said, they're pretty simple to figure out and there are basic comments
included with the source. Thanks again Chris.