# Document is empty

Source: https://xmlvalid.com/errors/document-is-empty

> There is no element in the document at all.

Example message: `Document is empty`

## Why it happens

- An empty file, or one with only whitespace, comments or an XML declaration.
- An export or download that failed and left a zero-byte file behind.

## How to fix it

- Check the file size and where the file came from. An XML document needs at least one element, its root.

## Example that fails

```xml

```

## Fixed

```xml
<note/>
```
