Consume data from XML file in an HTML5 application? Consume data from XML file in an HTML5 application? json json

Consume data from XML file in an HTML5 application?


You can do that by using Ajax and a Javascript XML parser. The best way to do that is with a JS library, like jQuery.

Check out jQuery ajax to grab your XML: http://api.jquery.com/jQuery.ajax/

jParse is a pretty decent xml parser: http://jparse.kylerush.net/

Ajax is for accessing pages in the same domain. If you need to grab a file on a different domain you'll have to find a different solution.