View Source Yex.XmlElement (y_ex v0.6.3)
A shared type that represents an XML node
Summary
Functions
get(xml_element, index)
deprecated
The next sibling of this type. Is null if this is the last child of its parent.
The parent that holds this type. Is null if this xml is a top-level XML type.
The previous sibling of this type. Is null if this is the first child of its parent.
Types
Functions
@spec children(t()) :: Enumerable.t(t() | Yex.XmlText.t())
@spec fetch(t(), integer()) :: {:ok, t() | Yex.XmlText.t()} | :error
@spec fetch(t(), integer()) :: t() | Yex.XmlText.t()
@spec first_child(t()) :: t() | Yex.XmlText.t() | nil
This function is deprecated. Rename to `fetch/2`.
@spec get(t(), integer()) :: {:ok, t() | Yex.XmlText.t()} | :error
@spec insert(t(), integer(), Yex.XmlElementPrelim.t() | Yex.XmlTextPrelim.t()) :: :ok | :error
@spec insert_after( t(), t() | Yex.XmlText.t(), Yex.XmlElementPrelim.t() | Yex.XmlTextPrelim.t() ) :: :ok | :error
@spec next_sibling(t()) :: t() | Yex.XmlText.t() | nil
The next sibling of this type. Is null if this is the last child of its parent.
@spec parent(t()) :: t() | Yex.XmlFragment.t() | nil
The parent that holds this type. Is null if this xml is a top-level XML type.
@spec prev_sibling(t()) :: t() | Yex.XmlText.t() | nil
The previous sibling of this type. Is null if this is the first child of its parent.
@spec push(t(), Yex.XmlElementPrelim.t() | Yex.XmlTextPrelim.t()) :: :ok | :error
@spec unshift(t(), Yex.XmlElementPrelim.t() | Yex.XmlTextPrelim.t()) :: :ok | :error