# Mindmap format · OPML

The resource `xale://formats/mindmap` says how to send a Mindmap: OPML 2.0 with Xale's namespace, one central topic, and optional attributes for done, side and style.

Checked 2026-12-05 · https://xale.app/docs/ai/mindmap-format-opml

## The resource

| Field | Value |
| --- | --- |
| `uri` | `xale://formats/mindmap` |
| `name` | `mindmap-format` |
| `title` | How to send a Mindmap (OPML) |
| `mimeType` | `text/markdown` |

`resources/read` with `{ "uri": "xale://formats/mindmap" }` returns this text:

```markdown
# Sending a Mindmap to Xale (xale_save_mindmap)

Send OPML 2.0: <opml version="2.0" xmlns:xale="https://xale.app/ns/opml/1"><head><title>…</title></head><body>…</body></opml>.
One top-level <outline text="…"> is the central topic and names the map; several top-level outlines become branches under the <title>.
Optional attributes: _link (a web link), xale:done, xale:collapsed, xale:side (left or right), xale:color, xale:bold, xale:italic, xale:strike. Unknown attributes are ignored. Any DTD or <!ENTITY> is refused.
At most 300 nodes, counting the central topic.
```

## A sample

```xml
<opml version="2.0" xmlns:xale="https://xale.app/ns/opml/1">
  <head><title>Kitchen options</title></head>
  <body>
    <outline text="Kitchen options">
      <outline text="Repaint the cabinets" xale:side="left"/>
      <outline text="New worktop">
        <outline text="Get three quotes" xale:done="true"/>
      </outline>
    </outline>
  </body>
</opml>
```

## Limits and refusals

Each refusal says what to fix. Nothing was saved, so send again with the same `requestId`.

| Limit | Refusal |
| --- | --- |
| 300 nodes, counting the central topic | "A Mindmap holds at most 300 nodes, counting the central topic. Send fewer outlines or split the map." |
| 20 levels deep | "The outline nests deeper than 20 levels. Flatten it." |
| 300 characters per outline's text | "An outline's text is longer than 300 characters. Shorten it." |
| No DTD or entities | "The OPML declares a DTD or an <!ENTITY>; remove it. Xale never reads either." |
| Not OPML | "This is not OPML. Send <opml version="2.0"><head><title>…</title></head><body><outline text="…">…</outline></body></opml>." |

The `opml` text is at most 240,000 characters and the whole call under 256 KB. For a big map, save the main branches first, then add the rest with [`xale_add_mindmap_nodes`](https://xale.app/docs/ai/tools/xale_add_mindmap_nodes).

## How it's served

Use `resources/list` to discover the OPML guide by its URI. To draw a saved Mindmap or an unsaved outline, call [`xale_render_mindmap`](https://xale.app/docs/ai/tools/xale_render_mindmap) for SVG or HTML.

## Related

- For people: [How do I import OPML into Xale?](https://xale.app/help/import-a-mindmap-opml-files)
- For people: [How do I export a Xale mind map as an image or OPML?](https://xale.app/help/export-a-mindmap-opml-and-image)
- For people: [How do I turn an outline into a mind map in Xale?](https://xale.app/help/line-by-line-without-ai)
- Tools: [xale_save_mindmap](https://xale.app/docs/ai/tools/xale_save_mindmap)
- Tools: [xale_add_mindmap_nodes](https://xale.app/docs/ai/tools/xale_add_mindmap_nodes)
- Read next: [Mindmaps · nodes and depth](https://xale.app/docs/ai/mindmaps-nodes-and-depth)
- Read next: [Mind mapping](https://xale.app/lexicon/mind-mapping)
- Read next: [Draw a Mindmap · as an image](https://xale.app/docs/ai/draw-a-mindmap-as-an-image)
