Why should I use XML in my website, when I’ve got a database driven website?
-
I’m new to XML. I read on http://www.w3schools.com/[^] that it’s important to understand that XML was designed to store, carry, and exchange data. XML was not designed to display data. Why should I use XML in my website, when I’ve got a database driven website, and all my data is located in that database?
-
I’m new to XML. I read on http://www.w3schools.com/[^] that it’s important to understand that XML was designed to store, carry, and exchange data. XML was not designed to display data. Why should I use XML in my website, when I’ve got a database driven website, and all my data is located in that database?
I'd pretty much say that if it ain't broke, don't fix it :) When I was first introduced to XML, I went through the exact same thought process ("Why would I use this in my site?") and ended up dismissing it. However, it was good to at least know it existed; on a project a few months later, it suddenly dawned on me that XML would work really well for the task, and thus I set about learning as much as I could about XML-related technologies to get a grasp of what tools were available. I think trying to graft XML into an existing (working) system is much like grabbing a hammer and pounding away at something until it looks like a nail. If you really want to get your feet wet in using XML, you can start by updating your site to be XHTML 1.0 valid. Then, play around with writing an XSLT translation to tweek things like removing links and extraneous style bits to produce a "printable" version of all your pages. Alternatively, you can learn the DOM or SAX API and write some code to do it. Either way, that should give you some ideas of how you can actually apply XML-related technologies. Oh yeah, and have fun! Use XML to make your life easier, not harder. ;) - Mike
-
I'd pretty much say that if it ain't broke, don't fix it :) When I was first introduced to XML, I went through the exact same thought process ("Why would I use this in my site?") and ended up dismissing it. However, it was good to at least know it existed; on a project a few months later, it suddenly dawned on me that XML would work really well for the task, and thus I set about learning as much as I could about XML-related technologies to get a grasp of what tools were available. I think trying to graft XML into an existing (working) system is much like grabbing a hammer and pounding away at something until it looks like a nail. If you really want to get your feet wet in using XML, you can start by updating your site to be XHTML 1.0 valid. Then, play around with writing an XSLT translation to tweek things like removing links and extraneous style bits to produce a "printable" version of all your pages. Alternatively, you can learn the DOM or SAX API and write some code to do it. Either way, that should give you some ideas of how you can actually apply XML-related technologies. Oh yeah, and have fun! Use XML to make your life easier, not harder. ;) - Mike