View Source Yex.XmlFragmentPrelim (y_ex v0.6.3)
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>"
Summary
Types
@type t() :: %Yex.XmlFragmentPrelim{ children: [Yex.XmlElementPrelim.t() | Yex.XmlTextPrelim.t()] }