# `Yog.IO.GEXF`
[🔗](https://github.com/code-shoily/yog_ex/blob/v0.97.0/lib/yog/io/gexf.ex#L1)

GEXF (Graph Exchange XML Format) serialization support.

Provides functions to serialize and deserialize graphs in GEXF format,
the native format of [Gephi](https://gephi.org/) and supported by
many other graph visualization tools.

GEXF is an XML-based format that supports:
- **Nodes** with typed attributes
- **Edges** with typed attributes and weights
- **Directed and undirected** graphs
- **Visual attributes** (viz namespace): color, size, position
- **Dynamic graphs** (not yet supported)

## Performance

Uses Saxy for fast streaming SAX parsing when available (same as GraphML).
Falls back to `:xmerl` otherwise.

# `default_options`

Returns default GEXF serialization options.

The options control data formatting:
- **node_formatter:** Function to convert node IDs to strings (default: `safe_string/1`)
- **edge_formatter:** Function to convert edge IDs to strings (default: `safe_string/1`)

# `deserialize`

Deserializes a GEXF string to a graph using default conversion.

# `deserialize_with`

Deserializes a GEXF string into a graph with custom data mappers.

# `options_with`

Creates GEXF options with custom formatters.

# `read`

Reads a graph from a GEXF file using default conversion.

# `read_with`

Reads a graph from a GEXF file with custom data mappers.

# `serialize`

Serializes a graph to GEXF format using default attribute conversion.

# `serialize_with`

Serializes a graph to GEXF format with custom attribute mappers.

# `serialize_with_options`

Serializes a graph to GEXF format with custom attribute mappers and options.

# `write`

Writes a graph to a GEXF file using default attribute conversion.

# `write_with`

Writes a graph to a GEXF file with custom attribute mappers.

---

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