Format for Document XML
Reference
You can view the XML of a Page by exporting it, compressing the result into a ZIP file, and then opening it with any tool that supports archive extraction. Inside the archive, you will find the package.xml descriptor file as well as the XML files for each Page exported. You can also view the XML by using the xpage=xml parameter when on wiki Page URL.
Document files are usually organized in directories that mirror the Page hierarchy (for example, News/Announcements.xml), but this structure is not technically required. Parsers (i.e., the components that read and interpret the XML files) ignore the file path and rely only on the information defined inside the document itself.
Example of a XML file:
<?xml version='1.1' encoding='UTF-8'?>
<xwikidoc version="1.6" reference="Welcome.AboutOurCompany.History.WebHome" locale="">
<web>Welcome.AboutOurCompany.History</web>
<name>WebHome</name>
<language/>
<defaultLanguage>en</defaultLanguage>
<translation>0</translation>
<creator>XWiki.Admin</creator>
<creationDate>1773427257000</creationDate>
<parent>Main.WebHome</parent>
<author>XWiki.Admin</author>
<originalMetadataAuthor>XWiki.Admin</originalMetadataAuthor>
<contentAuthor>XWiki.Admin</contentAuthor>
<date>1776264797000</date>
<contentUpdateDate>1776264676000</contentUpdateDate>
<version>9.1</version>
<title>History</title>
<comment/>
<minorEdit>false</minorEdit>
<syntaxId>xwiki/2.1</syntaxId>
<hidden>false</hidden>
<content>This is some fictional text.</content>
<attachment>
<filename>history-office.jpg</filename>
<author>XWiki.Admin</author>
<date>1773427257000</date>
<version>1.1</version>
<comment/>
<content>/</content>
<filesize>13098</filesize>
</attachment>
<class>
<name>Welcome.AboutOurCompany.History.WebHome</name>
<customClass/>
<customMapping/>
<defaultViewSheet/>
<defaultEditSheet/>
<defaultWeb/>
<nameField/>
<validationScript/>
<ExampleProperty>
<customDisplay/>
<defaultValue/>
<disabled>0</disabled>
<displayFormType>select</displayFormType>
<displayType/>
<hint>This is the hint of the example property</hint>
<name>ExampleProperty</name>
<number>1</number>
<prettyName>ExampleProperty</prettyName>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
</ExampleProperty>
</class>
<object>
<name>Welcome.AboutOurCompany.History.WebHome</name>
<number>0</number>
<className>XWiki.Like.LikeConfigurationClass</className>
<guid>a9980df3-dd1a-4edf-adb5-34b893b21c47</guid>
<class>
<name>XWiki.Like.LikeConfigurationClass</name>
<customClass/>
<customMapping/>
<defaultViewSheet/>
<defaultEditSheet/>
<defaultWeb/>
<nameField/>
<validationScript/>
<alwaysDisplayButton>
<customDisplay/>
<defaultValue/>
<disabled>0</disabled>
<displayFormType>checkbox</displayFormType>
<displayType/>
<hint/>
<name>alwaysDisplayButton</name>
<number>2</number>
<prettyName>alwaysDisplayButton</prettyName>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
</alwaysDisplayButton>
<cacheCapacity>
<customDisplay/>
<disabled>0</disabled>
<hint/>
<name>cacheCapacity</name>
<number>3</number>
<numberType>integer</numberType>
<prettyName>cacheCapacity</prettyName>
<size>30</size>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.NumberClass</classType>
</cacheCapacity>
<enabled>
<customDisplay/>
<defaultValue/>
<disabled>0</disabled>
<displayFormType>checkbox</displayFormType>
<displayType/>
<hint/>
<name>enabled</name>
<number>1</number>
<prettyName>enabled</prettyName>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
</enabled>
</class>
<property>
<alwaysDisplayButton>1</alwaysDisplayButton>
</property>
<property>
<cacheCapacity>500</cacheCapacity>
</property>
<property>
<enabled>1</enabled>
</property>
</object>
<object>
<name>Welcome.AboutOurCompany.History.WebHome</name>
<number>0</number>
<className>XWiki.XWikiComments</className>
<guid>322c7339-e99c-496e-a453-2b8643508913</guid>
<class>
<name>XWiki.XWikiComments</name>
<customClass/>
<customMapping/>
<defaultViewSheet/>
<defaultEditSheet/>
<defaultWeb/>
<nameField/>
<validationScript/>
<author>
<cache>0</cache>
<disabled>0</disabled>
<displayType>input</displayType>
<multiSelect>0</multiSelect>
<name>author</name>
<number>1</number>
<picker>1</picker>
<prettyName>Author</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<size>30</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.UsersClass</classType>
</author>
<comment>
<disabled>0</disabled>
<editor/>
<name>comment</name>
<number>5</number>
<prettyName>Comment</prettyName>
<restricted>1</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</comment>
<date>
<dateFormat>dd/MM/yyyy HH:mm:ss</dateFormat>
<disabled>0</disabled>
<emptyIsToday>1</emptyIsToday>
<name>date</name>
<number>2</number>
<picker>1</picker>
<prettyName>Date</prettyName>
<size>20</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.DateClass</classType>
</date>
<highlight>
<disabled>0</disabled>
<name>highlight</name>
<number>3</number>
<prettyName>Highlighted Text</prettyName>
<restricted>0</restricted>
<rows>2</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</highlight>
<originalSelection>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>originalSelection</name>
<number>6</number>
<prettyName>Original Selection</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</originalSelection>
<replyto>
<disabled>0</disabled>
<name>replyto</name>
<number>4</number>
<numberType>integer</numberType>
<prettyName>Reply To</prettyName>
<size>5</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.NumberClass</classType>
</replyto>
<selection>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>selection</name>
<number>3</number>
<prettyName>Selection</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</selection>
<selectionLeftContext>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>selectionLeftContext</name>
<number>4</number>
<prettyName>Selection Left Context</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</selectionLeftContext>
<selectionRightContext>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>selectionRightContext</name>
<number>5</number>
<prettyName>Selection Right Context</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</selectionRightContext>
<state>
<disabled>0</disabled>
<name>state</name>
<number>8</number>
<prettyName>State</prettyName>
<size>30</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</state>
<target>
<cache>0</cache>
<classname/>
<disabled>0</disabled>
<displayType>input</displayType>
<freeText>discouraged</freeText>
<multiSelect>0</multiSelect>
<name>target</name>
<number>7</number>
<picker>1</picker>
<prettyName>Target</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<size>30</size>
<sql/>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.PageClass</classType>
</target>
</class>
<property>
<author>XWiki.AnaSmith</author>
</property>
<property>
<comment>This article was posted also on the platform.</comment>
</property>
<property>
<date>2025-12-29 16:22:41.147</date>
</property>
<property>
<highlight></highlight>
</property>
<property>
<originalSelection></originalSelection>
</property>
<property>
<replyto/>
</property>
<property>
<selection></selection>
</property>
<property>
<selectionLeftContext></selectionLeftContext>
</property>
<property>
<selectionRightContext></selectionRightContext>
</property>
<property>
<state></state>
</property>
<property>
<target></target>
</property>
</object>
<object>
<name>Welcome.AboutOurCompany.History.WebHome</name>
<number>1</number>
<className>XWiki.XWikiComments</className>
<guid>0693a30a-f35b-447b-95ce-bc90b6ab062a</guid>
<class>
<name>XWiki.XWikiComments</name>
<customClass/>
<customMapping/>
<defaultViewSheet/>
<defaultEditSheet/>
<defaultWeb/>
<nameField/>
<validationScript/>
<author>
<cache>0</cache>
<disabled>0</disabled>
<displayType>input</displayType>
<multiSelect>0</multiSelect>
<name>author</name>
<number>1</number>
<picker>1</picker>
<prettyName>Author</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<size>30</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.UsersClass</classType>
</author>
<comment>
<disabled>0</disabled>
<editor/>
<name>comment</name>
<number>5</number>
<prettyName>Comment</prettyName>
<restricted>1</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</comment>
<date>
<dateFormat>dd/MM/yyyy HH:mm:ss</dateFormat>
<disabled>0</disabled>
<emptyIsToday>1</emptyIsToday>
<name>date</name>
<number>2</number>
<picker>1</picker>
<prettyName>Date</prettyName>
<size>20</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.DateClass</classType>
</date>
<highlight>
<disabled>0</disabled>
<name>highlight</name>
<number>3</number>
<prettyName>Highlighted Text</prettyName>
<restricted>0</restricted>
<rows>2</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</highlight>
<originalSelection>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>originalSelection</name>
<number>6</number>
<prettyName>Original Selection</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</originalSelection>
<replyto>
<disabled>0</disabled>
<name>replyto</name>
<number>4</number>
<numberType>integer</numberType>
<prettyName>Reply To</prettyName>
<size>5</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.NumberClass</classType>
</replyto>
<selection>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>selection</name>
<number>3</number>
<prettyName>Selection</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</selection>
<selectionLeftContext>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>selectionLeftContext</name>
<number>4</number>
<prettyName>Selection Left Context</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</selectionLeftContext>
<selectionRightContext>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>selectionRightContext</name>
<number>5</number>
<prettyName>Selection Right Context</prettyName>
<restricted>0</restricted>
<rows>5</rows>
<size>40</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</selectionRightContext>
<state>
<disabled>0</disabled>
<name>state</name>
<number>8</number>
<prettyName>State</prettyName>
<size>30</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</state>
<target>
<cache>0</cache>
<classname/>
<disabled>0</disabled>
<displayType>input</displayType>
<freeText>discouraged</freeText>
<multiSelect>0</multiSelect>
<name>target</name>
<number>7</number>
<picker>1</picker>
<prettyName>Target</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<size>30</size>
<sql/>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.PageClass</classType>
</target>
</class>
<property>
<author>XWiki.AlexJohnson</author>
</property>
<property>
<comment>Great article!</comment>
</property>
<property>
<date>2025-12-29 16:28:40.426</date>
</property>
<property>
<highlight></highlight>
</property>
<property>
<originalSelection></originalSelection>
</property>
<property>
<replyto/>
</property>
<property>
<selection></selection>
</property>
<property>
<selectionLeftContext></selectionLeftContext>
</property>
<property>
<selectionRightContext></selectionRightContext>
</property>
<property>
<state></state>
</property>
<property>
<target></target>
</property>
</object>
</xwikidoc>| Document elements | Sub-elements | Description |
|---|---|---|
| xwikidoc (the root of the XML element) | version | The version of the XML format, if not specified then it's 1.0. |
| reference | The reference of the Page. | |
| defaultLanguage | ||
| translation | ||
| creator | ||
| creationDate | ||
| parent | ||
| synatxId | ||
| hidden | ||
| minorEdit | ||
| originalMetadataAuthor | ||
| contentAuthor | ||
| locale | The locale (as defined in Java Locale specifications) of the document | |
| web | Deprecated, property containing the unique space of the document. | |
| name | Deprecated, the name of the document. | |
| language | Deprecated, the locale (as defined in Java Locale specifications) of the document. | |
| date | The last modification date of the document (format: epoch date and time UTC) | |
| contentUpdateDate | The last modification date of the document content (format: epoch date and time UTC) | |
| versions | A serialized version of the com.xpn.xwiki.doc.rcs.XWikiRCSArchive Java object | |
| enforceRequiredRights | Whether required rights shall be enforced. Only present when the value is true for increased backwards-compatibility. | |
| attachment | filename | The name of the file. |
| author | The author of the attachment. | |
| date | Epoch date and time UTC. | |
| version | The version of the attachment. | |
| comment | The comment associated to the version of the attachment. | |
| content | The binary content serialized in base64. | |
| filesize | The size of the attachment in bytes. | |
| mimtype | The MIME type of the attachment (as expressed by the RFC 6838). | |
| charset | The charset of the attachment (as expressed in the HTTP Content-Type). | |
| versions | Deprecated in favor of revisions. | |
| revisions | The revisions of the attachment, it contains the same properties than the attachment plus "contentAlias". | |
| revision | An alias to the content of the indicated version of the attachment revision. Empty string for current attachment. | |
| class | name | |
| customClass | ||
| customMapping | ||
| defaultViewSheet | ||
| defaultEditSheet | ||
| defaultWeb | ||
| nameField | ||
| validationScript | ||
| propN, where N is the number of the property | disabled: | |
| name: | ||
| number: | ||
| numberType: | ||
| prettyName: | ||
| size: | ||
| unmodifiable: | ||
| classType: | ||
| object | name | |
| number | ||
| className | ||
| guid |
FAQ
How are page dates (creation date, last edit date) stored in XAR files?
All dates are stored as numeric timestamps, representing the number of milliseconds elapsed since January 1, 1970, 00:00:00 (GMT). For example, the value 1700000000000 corresponds to November 14, 2023, 22:13:20 (GMT).
How is the translation of a Page conveyed in the XML format?
The translation of a Page has a separate XML Page, as it's treated in the wiki as a separate Page.