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-continue>
    <allcategories accontinue="Narrowboating" />
  </query-continue>
  <query>
    <allcategories>
      <c size="4" pages="4" files="0" subcats="0" xml:space="preserve">Debian</c>
      <c size="1" pages="1" files="0" subcats="0" xml:space="preserve">Documentation see also templates</c>
      <c size="2" pages="2" files="0" subcats="0" xml:space="preserve">Fedora</c>
      <c size="7" pages="7" files="0" subcats="0" xml:space="preserve">Hosting</c>
      <c size="2" pages="2" files="0" subcats="0" xml:space="preserve">Hosts</c>
      <c size="1" pages="1" files="0" subcats="0" xml:space="preserve">Ideas</c>
      <c size="7" pages="7" files="0" subcats="0" xml:space="preserve">Image with comment templates</c>
      <c size="1" pages="1" files="0" subcats="0" xml:space="preserve">Kennet and Avon Canal</c>
      <c size="3" pages="3" files="0" subcats="0" xml:space="preserve">Linux</c>
      <c size="1" pages="1" files="0" subcats="0" xml:space="preserve">Meet and greet</c>
    </allcategories>
  </query>
</api>