# Xml

Sane handler for XML files

****

- Full class name: `Kirby\Sane\Xml`
- Source: <https://github.com/getkirby/kirby/tree/5.5.3/src/Sane/Xml.php#L21>

****

### Xml

- [Xml::sanitize()](https://getkirby.com/docs/reference/objects/sane/xml/sanitize.md)
- [Xml::sanitizeAttr()](https://getkirby.com/docs/reference/objects/sane/xml/sanitize-attr.md)
- [Xml::sanitizeElement()](https://getkirby.com/docs/reference/objects/sane/xml/sanitize-element.md)
- [Xml::sanitizeFile()](https://getkirby.com/docs/reference/objects/sane/xml/sanitize-file.md)
- [Xml::validate()](https://getkirby.com/docs/reference/objects/sane/xml/validate.md)
- [Xml::validateDoctype()](https://getkirby.com/docs/reference/objects/sane/xml/validate-doctype.md)
- [Xml::validateFile()](https://getkirby.com/docs/reference/objects/sane/xml/validate-file.md)

## Restrict domains

By default, the sanitizer allows any kind of domains included in the XML file as they can be pretty common in many XML-based formats.

If you want to further restrict the allowed domains, you can set the following public attribute to a list of allowed domains:

```php
Kirby\Sane\Xml::$allowedDomains = ['https://getkirby.com'];
```