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 fo开发者_如何学编程r this purpose (that too just Javascript).
So, is it possible to generate HTML-5 page using XML data?
Thank you.
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.
Look over here. http://www.devarticles.com/c/a/JavaScript/JavaScript-and-XML/
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.
精彩评论