<br><br><div class="gmail_quote">2010/11/5 Platonides <span dir="ltr"><<a href="mailto:platonides@gmail.com">platonides@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">xiang wang wrote:<br>
> I have download the "Database backup dumps" of chinese Edition.<br>
> There are files with XML and sql format. I want to have data all in<br>
> database like MySQL. Can I get this data (especially the XML format) to<br>
> MySQL database without using MediaWiki? How to do this if possible?<br>
<br>
</div>I would use mwdumper to do that<br>
<a href="http://www.mediawiki.org/wiki/Manual:MWDumper" target="_blank">http://www.mediawiki.org/wiki/Manual:MWDumper</a><br>
Other options are listed in<br>
<a href="http://www.mediawiki.org/wiki/Manual:Importing_XML_dumps" target="_blank">http://www.mediawiki.org/wiki/Manual:Importing_XML_dumps</a><br>
<div class="im"><br>
<br>
> Where can I get the format details of each dump? Because I have read<br>
> contents in "zhwiki-20101014-pages-articles.xml" , but chiness have two<br>
> eddition: "Simplified Chinese" and “Traditional Chinese”. Both format<br>
> exits raffertily In file "zhwiki-20101014-pages-articles.xml" . I don't<br>
> known how to get rid it.<br>
><br>
> Thanks!<br>
<br>
</div>That file is in the same format as the wiki pages. The two variants come<br>
from the same text (which is what you get in the dump), automatically<br>
converted into one or other (with some especifics with text inside -{}- ).<br>
That content in a mediawiki install sohuld be able to replicate zhwiki<br>
pages.<br></blockquote><div><br>Thanks for answers! I used WMDumper and have another problems. I used following command(wikidata is my database):<br><i>set class=mwdumper.jar;mysql-connector-java-5.1.13/mysql-connector-java-5.1.13/mysql-connector-java-5.1.13-bin.jar<br>
set data="F:\Wikipedia Data\zhwiki-20101014-pages-articles.xml.bz2"<br><br>java -client -classpath %class% org.mediawiki.dumper.Dumper "--<br>output=mysql://<a href="http://127.0.0.1/wikidata?user=root&password=wang">127.0.0.1/wikidata?user=root&password=wang</a>" "--format=sql:1.5" %data%"</i><br>
<br>But I get a problem.<br><i>Exception in thread "main" java.io.IOException: java.sql.SQLException: Table 'w<br>kidata.text' doesn't exist<br> at org.mediawiki.importer.XmlDumpReader.readDump(XmlDumpReader.java:92)<br>
at org.mediawiki.dumper.Dumper.main(Dumper.java:143)</i><br><br>"Wikidata" is a database I constructed. How can I construct table "text"?<br>Thanks advanced!<br>David. <br></div></div><br>