* (bug 38190) Add "required" flag to some token params for hint in api docs.
* (bug 27567) Add file repo support to prop=duplicatefiles.
* (bug 27610) Add archivename for non-latest image version to list=filearchive
+* (bug 38231) Add xml parse tree to action=parse.
=== Languages updated in 1.20 ===
$result_array['properties'] = $this->formatProperties( $p_result->getProperties() );
}
+ if ( $params['generatexml'] ) {
+ $wgParser->startExternalParse( $titleObj, $popts, OT_PREPROCESS );
+ $dom = $wgParser->preprocessToDom( $this->text );
+ if ( is_callable( array( $dom, 'saveXML' ) ) ) {
+ $xml = $dom->saveXML();
+ } else {
+ $xml = $dom->__toString();
+ }
+ $result_array['parsetree'] = array();
+ $result->setContent( $result_array['parsetree'], $xml );
+ }
+
$result_mapping = array(
'redirects' => 'r',
'langlinks' => 'll',
'uselang' => null,
'section' => null,
'disablepp' => false,
+ 'generatexml' => false,
);
}
'uselang' => 'Which language to parse the request in',
'section' => 'Only retrieve the content of this section number',
'disablepp' => 'Disable the PP Report from the parser output',
+ 'generatexml' => 'Generate XML parse tree',
);
}