You are looking at the HTML representation of the XML format.
HTML is good for debugging, but is unsuitable for application use.
Specify the format parameter to change the output format.
To see the non HTML representation of the XML format, set format=xml.
See the complete documentation, or API help for more information.
<?xml version="1.0"?>
<api>
  <query>
    <namespaces>
      <ns id="-2" case="first-letter" canonical="Media" xml:space="preserve">मीडिया</ns>
      <ns id="-1" case="first-letter" canonical="Special" xml:space="preserve">विशेष</ns>
      <ns id="0" case="first-letter" content="" xml:space="preserve" />
      <ns id="1" case="first-letter" subpages="" canonical="Talk" xml:space="preserve">वार्ता</ns>
      <ns id="2" case="first-letter" subpages="" canonical="User" xml:space="preserve">सदस्य</ns>
      <ns id="3" case="first-letter" subpages="" canonical="User talk" xml:space="preserve">सदस्य वार्ता</ns>
      <ns id="4" case="first-letter" subpages="" canonical="Project" xml:space="preserve">Gadya Kosh</ns>
      <ns id="5" case="first-letter" subpages="" canonical="Project talk" xml:space="preserve">Gadya Kosh वार्ता</ns>
      <ns id="6" case="first-letter" canonical="File" xml:space="preserve">चित्र</ns>
      <ns id="7" case="first-letter" subpages="" canonical="File talk" xml:space="preserve">चित्र वार्ता</ns>
      <ns id="8" case="first-letter" subpages="" canonical="MediaWiki" xml:space="preserve">मीडियाविकि</ns>
      <ns id="9" case="first-letter" subpages="" canonical="MediaWiki talk" xml:space="preserve">मीडियाविकि वार्ता</ns>
      <ns id="10" case="first-letter" canonical="Template" xml:space="preserve">साँचा</ns>
      <ns id="11" case="first-letter" subpages="" canonical="Template talk" xml:space="preserve">साँचा वार्ता</ns>
      <ns id="12" case="first-letter" subpages="" canonical="Help" xml:space="preserve">सहायता</ns>
      <ns id="13" case="first-letter" subpages="" canonical="Help talk" xml:space="preserve">सहायता वार्ता</ns>
      <ns id="14" case="first-letter" canonical="Category" xml:space="preserve">श्रेणी</ns>
      <ns id="15" case="first-letter" subpages="" canonical="Category talk" xml:space="preserve">श्रेणी वार्ता</ns>
      <ns id="274" case="first-letter" canonical="Widget" xml:space="preserve">Widget</ns>
      <ns id="275" case="first-letter" subpages="" canonical="Widget talk" xml:space="preserve">Widget talk</ns>
    </namespaces>
  </query>
</api>