Following one of my last posts “App Interface and Data Update with UIWebViews, XML, XSLT and HTML” where some readers requested me to post an example of this method for rendering/generating HTML from XML and XSLT files.
Due to the lack of time from my part, I’ll not post the iPhone/iOS code but only the XML and XSLT files, to help those guys who asked for that. So, here it goes an example consisting of 2 files which can be rendered on almost any current browser like Firefox, Safari or Opera (it doesn’t worked on Chrome for me, don’t know why).
To try this example, just download the following 2 files:
Then open “scorers.xml” with one of the refered web browsers or simply click directly on that link and you should see in your screen the rendered HTML:
This sample code snippets were extracted from our South Africa 2010 Soccer Scores app which you can still download from the App Store [http://itunes.apple.com/pt/app/south-africa-2010-soccer-scores/id379206383?mt=8] and see how this technique working on a real app.
Now to integrate it in your iOS app, you only need to create an UIWebView where you’ll present it. That’s it! 🙂
As usual, your comments/suggestions are welcome…