12.6. Using the XML API and RequestBuilder

We can think of plenty of reasons to use XML instead of JSON, which is why GWT provides at least a minimal amount of support. The XML classes in GWT provide the capability of parsing, reading, and creating XML documents. By minimal support we mean that there’s no XML namespace support and no XML validation. But still, if you need to handle XML data, it gets the job done.

In this section we’ll be grabbing YouTube data yet again, but this time it will be returned as an XML document. Because of the browser’s same-origin policy, we can’t fetch the XML document from Google directly and will need to use a proxy.

12.6.1. Developing a server-side proxy

It’s fairly common to want to draw data from external ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.