---
title: "Element <diff>"
source: https://dev.pageseeder.com/psml/elements/element-diff.html
description: "PSML Element reference for <diff>"
last_updated: 2026-08-11T16:21:50+10:00
tokens: ~293
---

# \<diff\>

## Summary

Diffx compare of previous [document](../../reference/glossary/document.md) content with current. Only appears when comparing documents, but currently NOT available using the [ANT export task](../../guide/publishing/ant_api/tasks/task_export.md) as it is very processor intensive. Use the [ANT diff task](../../guide/publishing/ant_api/tasks/task_diff.md) to generate it after export.

## Usage context

| Element category |  |
| --- | --- |
| PSML level | processed |
| Permitted content | any |
| Permitted parent | `<compare>` |
| HTML equivalent | no equivalent |
| OpenXML equivalent | no equivalent |

## Attributes

This element does not have any attributes.

## Examples

```lang-xml

<diff>
  <fragment id="4">
    <para><dfx:ins>New</dfx:ins><dfx:del>Old</dfx:del> content</para>
  </fragment>
</diff>
```

## Schema

### XML Schema

```lang-xml

<xs:element name="diff">
  <xs:complexType mixed="true">
    <xs:sequence>
      <xs:any minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
```

## Compatibility

This element was introduced in PSML Beta 7 and is only supported from PageSeeder 5.6.

