# xml API reference

> The `xml` package, from xml, not published yet (commit 26128827ae6f), by `mojo doc` from Mojo 1.2.0.

## Modules

- [xml.document](https://magmalake.dev/s/xml/api/document.md): `xml.document` — a small read-only tree built from `XmlReader` events.
- [xml.reader](https://magmalake.dev/s/xml/api/reader.md): `xml.reader` — a pull parser over an in-memory XML document.

xml — a small pure-Mojo XML parser.

`xml.reader.XmlReader` is a pull parser (start / end / text events, entity
decoding, CDATA, comments and DOCTYPE skipped). `xml.document.Document`
builds a flat read-only tree on top of it and answers path queries, which is
what reading an API response actually needs.
