I hope this helps everyone who is faced with this same problem. Given that you will process the infobox using PHP, you can use this: http://www.mywiki.com/wiki/api.php?format=xml&action=query&titles=PAGE_TITLE_THAT_CONTAINS_AN_INFOBOX&prop=revisions&rvprop=content&rvgenerateml
'rvgeneratexml' is set to true (1), this will cause the xml node <rev> generate the "parsetree" attribute containing information about infoboxes in XML format.
Then in PHP you can load all the information ( <api> everything, including <rev></api> ) using simpleXML:
$xml = simplexml_load_file($url);
Then you can load the template information by getting the "parsetree" attribute and loading the line:
$template = simplexml_load_string($xml->query->pages->page->revisions->rev->attributes()->parsetree); $template = $template->template;
Then, using the correct structure, you can access the elements with something like:
if ($template->part[0]->name='name') $film = $template->part[0]->value;
Then $film will contain the name of the movie ( ->name is the name of the parameter, and ->value is its value).
source share