XML

Using Safari To View XML Files

This blog explains how to get nicely-formatted XML in the Safari browser.

Introduction

Recently we have been writing a series of blogs on the Tapestry framework showing how it can be used to create web applications. One of the blogs explains how to get the framework to return XML response for API integration. While creating the example we noticed that on OSX the Safari browser didn't give us back nicely-formatted XML files (see example)

initial in safari default.

 

In other browsers we did get the expected result. Since for most of the series we had been using screenshots from the Safari browser to illustrate the expected results, we wanted to stick with this browser. As it turns out, you can get nicely-formatted XML files in Safari, however this requires an additional one-time setup. Continue reading

Tapestry - Part IV: Extended API using XML

Introduction

In a previous blog in our Tapestry series we showed that Tapestry can be used as an API. While we would advice to do this only for simple cases, it could be a good solution if you wanted to offer Web API for your existing Tapestry application. If you were interested in a fully-fledged Web API with all the bells and whistles it would probably be better to use a separate framework.

In a previous blog we build an API returning JSON. This raises the question: is it also possible to return XML? The answer turns out to be yes!

In this blog we will show how to do so.

Prerequisites

Continue reading