"; // No idea what it does, but it makes it work $content_provider = new ContentProviderHTTP; $converter = new MediaWikiConverter; $xml = $converter->article2xml($title, $wikitext , $xmlg); // To convert to plain text: //~ require_once("xml2tree.php"); //~ require_once("xml2txt.php"); //~ $x2t = new xml2php ; //~ $tree = $x2t->scanString($xml); //~ $text = trim($tree->parse($tree)); file_put_contents($argv[2], $xml); ?>