View Source Yex.XmlFragment (y_ex v0.6.2)

A shared type to manage a collection of Y.Xml* Nodes

Summary

Types

@type t() :: %Yex.XmlFragment{doc: reference(), reference: reference()}

Functions

@spec children(t()) :: Enumerable.t(Yex.XmlElement.t() | Yex.XmlText.t())
Link to this function

delete(xml_fragment, index, length)

View Source
Link to this function

fetch(xml_fragment, index)

View Source
@spec fetch(t(), integer()) :: {:ok, Yex.XmlElement.t() | Yex.XmlText.t()} | :error
@spec fetch(t(), integer()) :: Yex.XmlElement.t() | Yex.XmlText.t()
Link to this function

first_child(xml_fragment)

View Source
Link to this function

get(xml_fragment, index)

View Source
This function is deprecated. Rename to `fetch/2`.
@spec get(t(), integer()) :: {:ok, Yex.XmlElement.t() | Yex.XmlText.t()} | :error
Link to this function

insert(xml_fragment, index, content)

View Source
Link to this function

insert_after(xml_fragment, ref, content)

View Source
@spec insert_after(
  t(),
  Yex.XmlElement.t() | Yex.XmlText.t(),
  Yex.XmlElementPrelim.t() | Yex.XmlTextPrelim.t()
) :: :ok | :error
Link to this function

push(xml_fragment, content)

View Source
@spec to_string(t()) :: binary()
Link to this function

unshift(xml_fragment, content)

View Source