---
title: "PSML"
source: https://dev.pageseeder.com/psml/universal_format/psml.html
description: "PSML is a modern XML format designed to replace PS XML, offering improved consistency, simplified metadata handling, and easier document fragment management. It uses a specific file extension and media type with no namespace requirements."
last_updated: 2026-09-05T17:36:18+10:00
tokens: ~605
---

# PSML

## Overview

The [PSML](../../reference/glossary/psml.md) format is designed to replace PS XML. Some of the ways it improves on the existing format are as follows:

- It is a more consistent, coherent and comprehensible format.
- Metadata such as `documentinfo` and `fragmentinfo` no longer requires a separate namespace.
- [Document fragments](../../reference/glossary/fragment.md) of different types can be added more easily.
- Document content can be reordered more easily in the user interface.

“PSML Quick Reference” can be downloaded from [documents](../../download/documents.md). For sample documents, see [PSML Sample Code](../../reference/sample_code/psml.md).

## Key ideas

Following are some of the key technical ideas behind PSML: 

- Use specific file extension `.psml`
- Has specific media type to `application/vnd.pageseeder.psml+xml`
- No namespace to keep language simple.
- Use lower case all element and attribute names (like many other XML languages).
- Use kebab case for compound names.
- Consistent with some core PageSeeder API elements such as [\<uri\>](../elements/element_uri.md) and [\<version\>](../elements/element_version.md).
- Use similar concept and syntax to HTML.

## Example

```xml

<?xml version="1.0" encoding="UTF-8"?>
  <document version="2.0" 
            date="2010-10-25T12:26+10:00"
            type="spec"
            level="portable" 
            schemaversion="1.0">
    <documentinfo>
      <uri id="123"
           ...
           mediatype="application/vnd.pageseeder.psml+xml"
           documenttype="spec"> ...
      </uri>
      ...
    </documentinfo>
    <fragmentinfo>
      <locator fragment="5" ...> ... </locator>
      ...
    </fragmentinfo>
    <section id="title">
      <fragment id="5">
        <heading level="1">My Spec</heading>
      </fragment>
    </section>
    <toc/>
    <section id="properties" lockstructure="true">
      <properties-fragment id="6">
        ...
      </properties-fragment>
    </section>
    <section id="content" title="Content">
      <fragment id="3" type="intro"> ... </fragment>
      <media-fragment id="4"
                      mediatype="application/mathml+xml">
        ...
      </media-fragment>
      <fragment id="1"> ... </fragment>
    </section>
    <section id="links" lockstructure="true">
      <title>Links</title>
      <xref-fragment id="7"> ... </fragment>
    </section>
  </document>
```

