View Source Yex.XmlText (y_ex v0.7.1)

Extends Y.Text to represent a Y.Xml node.

Summary

Functions

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

delta()

@type delta() :: Yex.Text.delta()

t()

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

Functions

apply_delta(xml_text, delta)

@spec apply_delta(t(), delta()) :: :ok | :error

delete(xml_text, index, length)

@spec delete(t(), integer(), integer()) :: :ok | :error

format(xml_text, index, length, attr)

@spec format(t(), integer(), integer(), map()) :: :ok | :error

insert(xml_text, index, content)

@spec insert(t(), integer(), Yex.input_type()) :: :ok | :error

insert(xml_text, index, content, attr)

@spec insert(t(), integer(), Yex.input_type(), map()) :: :ok | :error

length(xml_text)

@spec length(t()) :: integer()

next_sibling(xml_text)

@spec next_sibling(t()) :: Yex.XmlElement.t() | t() | nil

The next sibling of this type. Is null if this is the last child of its parent.

parent(xml_text)

@spec parent(t()) :: Yex.XmlElement.t() | Yex.XmlFragment.t() | nil

The parent that holds this type. Is null if this xml is a top-level XML type.

prev_sibling(xml_text)

@spec prev_sibling(t()) :: Yex.XmlElement.t() | t() | nil

The previous sibling of this type. Is null if this is the first child of its parent.

to_delta(xml_text)

to_string(xml_text)

@spec to_string(t()) :: binary()