# `Yex.XmlFragmentPrelim`
[🔗](https://github.com/satoren/y_ex/blob/main/lib/shared_type/xml_fragment.ex#L322)

A preliminary xml fragment. It can be used to early initialize the contents of a XmlFragment.

## Examples
    iex> doc = Yex.Doc.new()
    iex> array = Yex.Doc.get_array(doc, "array")
    iex> Yex.Array.insert(array, 0,  Yex.XmlFragmentPrelim.new([Yex.XmlElementPrelim.empty("div")]))
    iex> {:ok, %Yex.XmlFragment{} = fragment} = Yex.Array.fetch(array, 0)
    iex> Yex.XmlFragment.to_string(fragment)
    "<div></div>"

# `t`

```elixir
@type t() :: %Yex.XmlFragmentPrelim{
  children: [Yex.XmlElementPrelim.t() | Yex.XmlTextPrelim.t()]
}
```

# `new`

Creates a new preliminary XML fragment with the given children.
The children can be a mix of XmlElementPrelim and XmlTextPrelim nodes.

## Parameters
  * `children` - A list or enumerable of preliminary XML nodes (elements or text)

## Returns
  * A new XmlFragmentPrelim struct containing the provided children

---

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