# `SefazDanfe.Cte.Data`
[🔗](https://github.com/devaction-labs/sefaz_danfe/blob/v0.1.0/lib/sefaz_danfe/cte/data.ex#L1)

The data of a DACTE, read from the `cteProc` (or `cteOSProc`) SEFAZ authorized: what the PDF is
drawn from.

Pure: it takes the XML (`SefazNfe.Builder.parse_cte/2`, `parse_cte_os/2`) and answers a map with
string keys that the JSON encoder takes as is. Every value is already presented the Brazilian way
(`SefazDanfe.Format`) and is `nil` when the XML does not have it: nothing is computed or invented.
The blocks follow the DACTE of the MOC (road modal): the identification of the document at the top
with the `protocol` of the authorization, the `emitter`, the `taker` and the parties of the
service (`sender`, `recipient`, `dispatcher`, `receiver`), the `amounts` of the service and its
`icms`, the `cargo` with the NF-e it carries (a CT-e) or the `service` (a CT-e OS), the road
`modal` and the `additional_info`.

# `t`

```elixir
@type t() :: %{required(String.t()) =&gt; term()}
```

# `from_xml`

```elixir
@spec from_xml(String.t(), 57 | 67) :: {:ok, t()} | {:error, term()}
```

The DACTE data of the `cteProc` of a document of `model` (57 or 67) in `xml`.

---

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