{"id":199,"date":"2011-11-08T01:26:58","date_gmt":"2011-11-08T01:26:58","guid":{"rendered":"http:\/\/xphone.pt\/devnotes\/?p=199"},"modified":"2011-11-08T02:11:07","modified_gmt":"2011-11-08T02:11:07","slug":"app-interface-example-of-html-generation-from-xml-and-xslt","status":"publish","type":"post","link":"http:\/\/xphone.pt\/devnotes\/2011\/11\/app-interface-example-of-html-generation-from-xml-and-xslt\/","title":{"rendered":"App Interface &#8211; Example of HTML Generation from XML and XSLT"},"content":{"rendered":"<p>Following one of my last posts &#8220;<a href=\"http:\/\/xphone.pt\/devnotes\/2011\/02\/app-interface-and-data-update-with-uiwebviews-xml-xslt-and-html\/\">App Interface and Data Update with UIWebViews, XML, XSLT and HTML<\/a>&#8221; where some readers requested me to post an example of this method for rendering\/generating HTML from XML and XSLT files.<\/p>\n<p>Due to the lack of time from my part, I&#8217;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&#8217;t worked on Chrome for me, don&#8217;t know why).<\/p>\n<p>To try this example, just download the following 2 files:<\/p>\n<ul>\n<li>&#8220;<a title=\"scorers.xml\" href=\"http:\/\/xphone.pt\/devnotes\/pubfiles\/scorers.xml\" target=\"_blank\">scorers.xml<\/a>&#8221;\u00a0and<\/li>\n<li>&#8220;<a title=\"scorers.xsl\" href=\"http:\/\/xphone.pt\/devnotes\/pubfiles\/scorers.xsl\" target=\"_blank\">scorers.xsl<\/a>&#8220;.<\/li>\n<\/ul>\n<p>Then open &#8220;scorers.xml&#8221; with one of the refered web browsers or simply click directly on that link and you should see in your screen the rendered HTML:<\/p>\n<p><a href=\"http:\/\/xphone.pt\/devnotes\/wp-content\/uploads\/2011\/11\/scorers.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-198\" title=\"scorers\" src=\"http:\/\/xphone.pt\/devnotes\/wp-content\/uploads\/2011\/11\/scorers.png\" alt=\"\" width=\"187\" height=\"233\" \/><\/a><\/p>\n<p>This sample code\u00a0snippets\u00a0were extracted from our\u00a0<a title=\"SA2010SS\" href=\"http:\/\/xphone.me\/sa2010ss\/\" target=\"_blank\">South Africa 2010 Soccer Scores<\/a> app which you can still download from the App Store [<a title=\"SA2010SS @ AppStore\" href=\"http:\/\/itunes.apple.com\/pt\/app\/south-africa-2010-soccer-scores\/id379206383?mt=8\" target=\"_blank\">http:\/\/itunes.apple.com\/pt\/app\/south-africa-2010-soccer-scores\/id379206383?mt=8<\/a>] and see how this\u00a0technique\u00a0working on a real app.<\/p>\n<p>Now to integrate it in your iOS app, you only need to create an <a title=\"UIWebView Class Reference\" href=\"https:\/\/developer.apple.com\/library\/ios\/#documentation\/UIKit\/Reference\/UIWebView_Class\/Reference\/Reference.html\" target=\"_blank\">UIWebView<\/a> where you&#8217;ll present it. That&#8217;s it! \ud83d\ude42<\/p>\n<p>As usual, your comments\/suggestions are welcome&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following one of my last posts &#8220;App Interface and Data Update with UIWebViews, XML, XSLT and HTML&#8221; 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&#8217;ll not post the iPhone\/iOS code but only the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13,36,61,59,44],"tags":[34,41,60,43,50,40,51,42],"_links":{"self":[{"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/posts\/199"}],"collection":[{"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":10,"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/posts\/199\/revisions"}],"predecessor-version":[{"id":205,"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/posts\/199\/revisions\/205"}],"wp:attachment":[{"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/media?parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/categories?post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xphone.pt\/devnotes\/wp-json\/wp\/v2\/tags?post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}