# `ExDav.CalDav.XML`
[🔗](https://git.sr.ht/~sbr/ExDav)

XML response builders and small request parsers for the CalDAV
endpoints. Generates Multi-Status (RFC 4918) responses with the
CalDAV (RFC 4791) and CalendarServer extensions.

# `extract_prop_names`

Extract requested property element local names from a PROPFIND or
PROPPATCH body. Returns a list of `{namespace, local_name}` tuples.

# `multistatus`

Render a Multi-Status XML document from a list of `<response>` elements.

# `parse_calendar_query`

Parse a calendar-query body for a `prop-filter[name=UID]/text-match`
match. Returns `{:uid, value}` or `:no_uid_filter`. Also returns the
set of comp-filter component names found at the inner level
(e.g. `["VEVENT"]`).

# `parse_mkcalendar`

Parse MKCALENDAR body for displayname / description (best-effort).

# `parse_multiget_hrefs`

Parse a calendar-multiget body to extract the list of `<href>` values.

# `parse_propfind`

Returns the list of requested property element names (as strings,
prefixed with `d:`/`c:`/`cs:` style tags) and a flag indicating whether
the request asked for `<allprop>` or `<propname>`. We keep parsing
minimal: anything not understood becomes a `404 Not Found` propstat.

# `parse_proppatch`

Parse PROPPATCH body — best-effort for displayname / description.

# `parse_sync_collection`

Parse a `sync-collection` REPORT body. Returns the integer version
encoded in the sync-token (or `nil` for an empty/initial token) and
the requested prop names (currently only used to decide whether to
return calendar-data).

# `response`

Build a single `<d:response>` element. `props_with_status` is a list
of `{status_string, [{prop_tag, attrs, children}]}` tuples — each
group is wrapped in its own `<d:propstat>`.

# `response_status`

Build a deletion-style `<d:response>` (no `<d:propstat>`, just a
top-level `<d:status>`). Used by `sync-collection` to signal removed
resources.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
