export-demo.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
  2. <!-- Optional global configuration info -->
  3. <siteinfo>
  4. <!-- Site name, as set in $wgSitename -->
  5. <sitename>DemoWiki</sitename>
  6. <!-- Database name, as set in $wgDBname -->
  7. <dbname>demowiki</dbname>
  8. <!-- Forgot where you got this set? -->
  9. <base>http://example.com/wiki/Main_Page</base>
  10. <!-- Source software version -->
  11. <generator>MediaWiki 1.24</generator>
  12. <!-- Title case sensitivity options of the wiki this data came from -->
  13. <!-- May be 'first-letter', 'case-sensitive', or 'case-insensitive' -->
  14. <case>first-letter</case>
  15. <!-- Defined namespace keys on the source wiki. -->
  16. <namespaces>
  17. <namespace key="-2" case="first-letter">Media</namespace>
  18. <namespace key="-1" case="first-letter">Special</namespace>
  19. <namespace key="0" case="first-letter" />
  20. <namespace key="1" case="first-letter">Talk</namespace>
  21. <namespace key="2" case="first-letter">User</namespace>
  22. <namespace key="3" case="first-letter">User talk</namespace>
  23. <namespace key="4" case="first-letter">DemoWiki</namespace>
  24. <namespace key="5" case="first-letter">DemoWiki talk</namespace>
  25. <namespace key="6" case="first-letter">File</namespace>
  26. <namespace key="7" case="first-letter">File talk</namespace>
  27. <namespace key="8" case="first-letter">MediaWiki</namespace>
  28. <namespace key="9" case="first-letter">MediaWiki talk</namespace>
  29. <namespace key="10" case="first-letter">Template</namespace>
  30. <namespace key="11" case="first-letter">Template talk</namespace>
  31. <namespace key="12" case="first-letter">Help</namespace>
  32. <namespace key="13" case="first-letter">Help talk</namespace>
  33. <namespace key="14" case="first-letter">Category</namespace>
  34. <namespace key="15" case="first-letter">Category talk</namespace>
  35. </namespaces>
  36. </siteinfo>
  37. <!-- The rest of the data will be a series of page records -->
  38. <page>
  39. <!-- Titles are listed here in text form, with namespace prefix -->
  40. <!-- if any, and spaces rather than the underscores used in URLs. -->
  41. <title>Page title</title>
  42. <!-- Namespace in canonical form -->
  43. <ns>0</ns>
  44. <!-- The page's immutable page_id number in the source database. -->
  45. <!-- Page ID numbers are kept across page moves, but may change -->
  46. <!-- if a page is deleted and recreated. -->
  47. <id>1</id>
  48. <!-- Tag whether this article is a redirect and its target -->
  49. <!-- This corresponds to the page_is_redirect in the page table -->
  50. <redirect title="Target" />
  51. <!-- If restricted, the ACL is listed here raw. -->
  52. <restrictions>edit=sysop:move=sysop</restrictions>
  53. <!-- With a series of revision records... -->
  54. <!-- Remember this is XML; if you must use a regex-based extractor -->
  55. <!-- in place of a standard XML parser, be very careful. -->
  56. <!-- * Don't forget to decode character entities! -->
  57. <!-- * If using a 'loose' XML parser, ensure that whitespace is -->
  58. <!-- preserved in the <text> elements. -->
  59. <revision>
  60. <!-- Unique revision ID number (rev_id) in the source database. -->
  61. <!-- This number uniquely identifies the revision on that wiki. -->
  62. <id>100</id>
  63. <!-- revision id of the parent revision -->
  64. <parentid>99</parentid>
  65. <timestamp>2001-01-15T13:15:00Z</timestamp>
  66. <contributor>
  67. <username>Foobar</username>
  68. <id>42</id>
  69. </contributor>
  70. <minor />
  71. <comment>I have just one thing to say!</comment>
  72. <model>wikitext</model>
  73. <format>text/x-wiki</format>
  74. <text xml:space="preserve" bytes="25">A bunch of [[text]] here.</text>
  75. <sha1>5x0ux8iwjrbmfzgv6pkketxgkcnpr7h</sha1>
  76. </revision>
  77. <revision>
  78. <id>99</id>
  79. <timestamp>2001-01-15T13:10:27Z</timestamp>
  80. <contributor>
  81. <ip>10.0.0.2</ip>
  82. </contributor>
  83. <comment>new!</comment>
  84. <model>wikitext</model>
  85. <format>text/x-wiki</format>
  86. <text xml:space="preserve" bytes="24">An earlier [[revision]].</text>
  87. <sha1>etaxt3shcge6igz1biwy3d4um2pnle4</sha1>
  88. </revision>
  89. </page>
  90. <page>
  91. <title>Talk:Page title</title>
  92. <ns>1</ns>
  93. <id>2</id>
  94. <revision>
  95. <id>101</id>
  96. <timestamp>2001-01-15T14:03:00Z</timestamp>
  97. <contributor><ip>10.0.0.2</ip></contributor>
  98. <comment>hey</comment>
  99. <model>wikitext</model>
  100. <format>text/x-wiki</format>
  101. <text xml:space="preserve" bytes="47">WHYD YOU LOCK PAGE??!!! i was editing that jerk</text>
  102. <sha1>ml80vmyjlixdstnywwihx003exfzq9j</sha1>
  103. </revision>
  104. </page>
  105. <page>
  106. <title>File:Some image.jpg</title>
  107. <ns>6</ns>
  108. <id>3</id>
  109. <revision>
  110. <id>102</id>
  111. <timestamp>2001-01-15T20:34:12Z</timestamp>
  112. <contributor><username>Foobar</username><id>42</id></contributor>
  113. <comment>My awesomeest image!</comment>
  114. <model>wikitext</model>
  115. <format>text/x-wiki</format>
  116. <text xml:space="preserve" bytes="52">This is an awesome little imgae. I lurves it. {{PD}}</text>
  117. <sha1>mehom37npwkpzhaiwu3wyr0egalumki</sha1>
  118. </revision>
  119. <upload>
  120. <timestamp>2001-01-15T20:34:12Z</timestamp>
  121. <contributor><username>Foobar</username><id>42</id></contributor>
  122. <comment>My awesomeest image!</comment>
  123. <filename>Some_image.jpg</filename>
  124. <src>http://upload.wikimedia.org/commons/2/22/Some_image.jpg</src>
  125. <size>12345</size>
  126. </upload>
  127. </page>
  128. <!-- or a series of logitem records, but normaly page and logitem never exist both in one file -->
  129. <logitem>
  130. <id>15</id>
  131. <timestamp>2008-10-23T03:20:32Z</timestamp>
  132. <contributor>
  133. <username>Wikimedian</username>
  134. <id>12345</id>
  135. </contributor>
  136. <comment>content was: 'I think this was a silly edit'</comment>
  137. <type>delete</type>
  138. <action>delete</action>
  139. <logtitle>Silly page name</logtitle>
  140. <params xml:space="preserve" />
  141. </logitem>
  142. </mediawiki>