# `BB.Urdf.Xml`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/urdf/xml.ex#L5)

XML building utilities using Erlang's xmerl library.

# `element`

```elixir
@spec element(atom(), keyword(), list()) :: tuple()
```

Build an xmerl element tuple.

Attributes are converted to charlists as required by xmerl.
Nil children are filtered out.

# `format_float`

```elixir
@spec format_float(number()) :: String.t()
```

Format a float with 6 decimal places, trimming trailing zeros.

# `format_xyz`

```elixir
@spec format_xyz({number(), number(), number()}) :: String.t()
```

Format a 3-tuple as space-separated values.

# `to_string`

```elixir
@spec to_string(tuple()) :: String.t()
```

Convert an xmerl element tree to an XML string with declaration.

---

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