---
title: "How to convert XML data to PSML documents"
source: https://dev.pageseeder.com/get_started/tutorials/how_to_convert_xml_data_to_psml_documents.html
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~832
---

# How to convert XML data to PSML documents

| Property | Value |
| --- | --- |
| Skills required | XML, XSLT |
| Time required (minutes) | 30 |
| Intended audience | Developer |
| Difficulty | Easy |
| Category | Document |

## Objective

Content of PSML documents often originates in other XML formats. This tutorial will demonstrate how to convert XML generated by Wikipedia to [PSML](../../psml.md) documents using [XSLT](http://www.w3.org/TR/xslt20).

After it is converted, the PSML will be uploaded to PageSeeder for checking or further editing.

## Prerequisites

To complete this tutorial requires:

- Software to read and write zip files (e.g. **7-Zip** or on Windows right-click Extract all/Send to Compressed).
- Access to a PageSeeder server with at least a contributor role on the tutorial group.

All the necessary files for this tutorial are on [Github](https://github.com/pageseeder/pageseeder-tutorials/tree/master/converting_xml_to_psml).

### Run the XSLT code

The easiest way to do this is to follow the instructions in [How to run XSLT from Eclipse](how_to_run_xslt_from_eclipse.md) but if the Eclipse IDE is not available follow [How to run XSLT from the command line](how_to_run_xslt_from_the_command_line.md). When doing this use the following`:`

- `films` - the name of the data folder.
- `wikipediafilms.xml` – the input XML from Github.
- `films.xsl` – the XSLT code from Github.

It should create files in the output folder according to the following naming pattern:

```text
 film-[n].psml
```

or

```text
film-1.psml
film-2.psml
film-3.psml
etc....
```

Before continuing, open some files in a text editor to check the content. Also to understand the XSLT conversion code or PSML markup, review `wikipediafilms.xml` and `films.xsl`.

### Include images

Adding images to the collection requires storing the image files in a paths relative to the text. For example, the following:

```text
films\
films\images
```

Copy the film images from Github to this folder.

### Package and upload the PSML

The final step requires moving the data from a local file system into PageSeeder. Do this via the following steps:

1. 'Zip' the folder with the \*`.psml` and image files into a single zip archive. 
2. Upload the archive to the PageSeeder group and select the unzip icon  
![“Plus” button – Upload document](/content/get_started/tutorials/../../images/tutorials/plus_button_upload_v60000.webp)
3. After unzipping the archive, simply continue through the upload.  
![Upload documents – Unzip button](/content/get_started/tutorials/../../images/tutorials/upload_unzip_v60000.webp)



#### Next Steps

The film documents can now be viewed in PageSeeder and can be used in conjunction with other tutorials to further explore PageSeeder development. Recommended tutorials are:

- [How to convert XML data to a linked collection of PSML documents](how_to_convert_xml_data_to_psml_documents_with_xrefs.md)– learn how to link PSML document with cross-references (XRefs).
- [Upload and link spreadsheet data with documents](upload_excel_as_psml.md) – learn how to integrate Excel data with PageSeeder documents.
- [Create a searchable index for an external website](how_to_create_a_berlioz_index_using_psml_content.md) – use the PageSeeder eco-system to build search capabilities into an external website.

