- - - - -

XML use in web design -why?


  • Please log in to reply
4 replies to this topic

#1 shrdlu

shrdlu

    Small Orange

  • Members
  • PipPip
  • 12 posts

Posted 04 April 2011 - 05:20 PM

I've been looking at lots of XML use around the web lately. I think understand the benefits of using it in databases (like partsregistry.org genetic parts database/website I need to work with) but regular web pages? For example Blizzard's web pages are all running with .xml extensions now.

Any idea why that's so? Can anyone explain the benefits of xml usage on the web in layman's terms?

#2 IBBoard

IBBoard

    Massive Orange

  • Volunteer Moderators
  • PipPipPipPipPipPipPip
  • 4,739 posts

Posted 05 April 2011 - 01:45 PM

XML is for when you want to structure data. (X)HTML is for when you want to display a page to a user. You can use XML with an XSLT (Extensible Stylesheet Language Transformation) to "pretty-print" it for users (e.g. phpBB's MODX format, which is XML files with a .xsl) but that's because they want to automate the instructions as well and so need the structure.

If you're going to use XML then you need a structure. If you don't have a structure (DTD at the least, preferably a schema of some kind) then you're cheating yourself and not really gaining the benefits.
The more information you provide, the better answer the community can give.

*** Sign up at ASO  with a 15% discount (coupon: saveme15%) or $5 discount (coupon: saveme$5) ***
(Valid on shared hosting and VPS)

#3 NyteOwl

NyteOwl

    36 Bits forever!

  • Volunteer Moderators
  • PipPipPipPipPipPipPip
  • 1,902 posts

Posted 05 April 2011 - 03:14 PM

It provides a much finer grained control and structure of data but is overkill for most web pages.
Obsolescence is just a lack of imagination.

Sign up at ASO and enjoy friendly, quality hosting services. Use coupon code no2512 and save 15% or coupon code 2152on and take $5 off. Valid on both Shared Hosting and VPS plans.

#4 Emmily

Emmily

    Tiny Orange

  • Members
  • Pip
  • 4 posts

Posted 27 October 2011 - 02:57 AM

Yes its also useful to Search engine to scroll pages and make page with less page load time.

#5 ASOAyron

ASOAyron

    ASO Ninja

  • Support
  • 44 posts

Posted 17 March 2013 - 04:58 AM

It provides a sort of built-in separation between Model (the data) and View (the way it's presented) just like in MVC frameworks like Ruby on Rails (but in a client-side way) when you use XML with XSLT. The XML is transformed by the XSLT into XHTML that a browser can parse and display. The real advantage for that is, for example, if you write an XML file (or server-side code that generates one) that contains information on books in your library, you can create one XSLT stylesheet for a normal desktop computer view, one for mobile devices, and one for printing. Your XML won't change, you'll just use stylesheets.

There's also AJAX (Asynchronous Javascript and XML) which lets you dynamically update the contents of the page without reloading the page by sending XML to the browser and parsing it with Javascript. That's how stuff like Twitter showing new Tweets without reloading and Google Maps loading more map tiles as you scroll around work.
Ayron
Your Friendly Neighborhood Technical Support Ninja Posted Image

Disclaimer: While I do indeed work for A Small Orange, my posts here do not necessarily represent the views of my employer. As such, my posts here are not official support from A Small Orange. If you need official support, please go to the official support portal.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users