Example of parsing a WMTS GetCapabilities response.
See the wmts-capabilities.js source to see how this is done.