## format_xml()


The document text with its entities as inline elements.


Usage

``` python
format_xml(
    doc,
    *,
    tag=None,
    type_attr="type",
    ref_attr="ref",
    lossy="warn",
)
```


## Raises


`UnrepresentableError`  
In the default style, a label that is not a valid XML element name (e.g. `protein_N/A`) or a missing label; pass `tag=` to write any label.
