Topic on Talk:Phabricator/Help

The XML document returned by Wikipedia API is not well formed.

3
Summary by AKlapper (WMF)

Question not about Wikimedia Phabricator but MediaWiki API - please ask on Project:Support desk

184.171.60.216 (talkcontribs)
AKlapper (WMF) (talkcontribs)

Welcome on the help page for Wikimedia Phabricator. Your question seems to be related to MediaWiki and Wikipedia instead - please ask on Project:Support desk . Thanks!

Ltrlg (talkcontribs)

This part of the returned content is not XML but wikitext (look at contentformat="text/x-wiki" on the surrounding tag), which is not as strict as XML (actually, almost any input is valid, even if not necessarily meaningful). It is properly escaped and should be parsed by any compliant XML parser as a text node.

There is no official XML representation of wikitext, but you may be interested in Parsoid’s output HTML or by parsers like mwparserfromhell for automated tasks involving wikitext.