# `ExCEP.Model.IcdParser`

DL/T 860 (IEC 61850) `.icd` XML model parser per CSG CEP **TS2.1** Section 8.2 & 9.1.

Uses Erlang's built-in `:xmerl` (zero external XML dependencies) to parse `<SCL>` files
into the unified `%ExCEP.Model{}` representation so `.icd` and `.json` models share the
same query API and can be checked for consistency via `ExCEP.Model.Consistency`.

# `parse_file`

```elixir
@spec parse_file(Path.t(), keyword()) :: {:ok, ExCEP.Model.t()} | {:error, term()}
```

Parses a TS2.1 `.icd` file from disk into `%ExCEP.Model{}`.

## Options
- `:check_filename` - verify filename matches `<model>.icd` with `_I_` marker (default `true`)

# `parse_xml`

```elixir
@spec parse_xml(binary(), keyword()) :: {:ok, ExCEP.Model.t()} | {:error, term()}
```

Parses an `.icd` XML binary into `%ExCEP.Model{}`.

---

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