Reputation: 31
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.
Upvotes: 3
Views: 3816
Reputation: 1010
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.
Upvotes: 4
Reputation:
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.
Upvotes: 2
Reputation: 18592
Look over here. http://www.devarticles.com/c/a/JavaScript/JavaScript-and-XML/
Upvotes: 2