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