My geoserver WMS GetCapabilities request returns an XML file download popup. But I want to see xml result on my browser. And I want to request via ajax request. But could not.
WMS Get capabilities like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/capabilities_1_1_1.dtd" >
<WMT_MS_Capabilities version="1.1.1">
<Service>
<Name>OGC:WMS</Name>
<Title>Web Map Service</Title>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://.."/>
</Service>
<Capability>
<Request>
<GetCapabilities>
<Format>application/vnd.ogc.wms_xml</Format>
<DCPType>
<HTTP>
<Get>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://..."/>
</Get>
</HTTP>
</DCPType>
</GetCapabilities>
Best Answer
WMS till version 1.1.1 is using mime type application/vnd.ogc.wms_xml. Set your system to open such documents with a browser or use WMS 1.3.0 that is using mime type that is understood by browsers automatically.
Compare
http://demo.geo-solutions.it/geoserver/wms?service=WMS&version=1.3.0&request=GetCapabilities
vs.
http://demo.geo-solutions.it/geoserver/wms?service=WMS&version=1.1.1&request=GetCapabilities