A preliminary xml element. It can be used to early initialize the contents of a XmlElement.
Examples
iex> doc = Yex.Doc.new()
iex> xml = Yex.Doc.get_xml_fragment(doc, "xml")
iex> Yex.XmlFragment.insert(xml, 0, Yex.XmlElementPrelim.empty("div"))
iex> Yex.XmlFragment.to_string(xml)
"<div></div>"
Summary
Functions
Creates a preliminary xml element with the given tag and no children or attributes.
Creates a preliminary xml element with the given tag, children and attributes.
Types
@type t() :: %Yex.XmlElementPrelim{ attributes: %{required(binary()) => Yex.input_type()}, children: [t() | Yex.XmlTextPrelim.t()], tag: String.t() }
Functions
Creates a preliminary xml element with the given tag and no children or attributes.
@spec new(String.t(), Enumerable.t(), %{ required(String.t()) => String.t() | Yex.PrelimType.t() }) :: t()
Creates a preliminary xml element with the given tag, children and attributes.