3

I have data coming from a server in pure XML format, but I want to render the output as a rich HTML 5 page for the user. I got to use only client side scripting for this purpose (that too just Javascript).

So, is it possible to generate HTML-5 page using XML data?

Thank you.

KillBill
  • 31
  • 1
  • 3

3 Answers3

4

You could use XSLT to transform the xml. That's exactly that its for and all major browsers support them, including IE6.

Otherwise, you could have a bare HTML with just a <head> and a <body> with jQuery and some JS wizardry.

Adrian Gonzales
  • 1,010
  • 6
  • 8
2

Look over here. http://www.devarticles.com/c/a/JavaScript/JavaScript-and-XML/

j7nn7k
  • 17,995
  • 19
  • 78
  • 88
2

Newer browers can parse XML

http://www.w3schools.com/xml/xml_parser.asp

So it should be possible to parse the XML in the browser, and then write code to take the model and render it as you see fit.