View Source Exogiri.Xml.Document (exogiri v0.2.1)

Encapsulates an XML document.

Link to this section Summary

Types

t()

The Document type.

Functions

Build a document from a string.

New document with a namespace and a named root element.

New document with no namespaces and a named root element.

Return the document root.

Use if you are of the opinion your Document is better serialized.

Link to this section Types

Specs

t() :: %Exogiri.Xml.Document{ref: reference()}

The Document type.

Link to this section Functions

Specs

from_string(String.t()) :: {:error, :parse_failed | [String.t()]} | {:ok, t()}

Build a document from a string.

Link to this function

new_with_ns(root_name, root_abbrev, root_href)

View Source

Specs

new_with_ns(String.t(), nil | String.t(), String.t()) ::
  {t(), Exogiri.Xml.Node.t()}

New document with a namespace and a named root element.

Link to this function

new_without_ns(root_name)

View Source

Specs

new_without_ns(String.t()) :: {t(), Exogiri.Xml.Node.t()}

New document with no namespaces and a named root element.

Specs

root(t()) :: Exogiri.Xml.Node.t()

Return the document root.

Specs

to_xml(t()) :: binary()

Use if you are of the opinion your Document is better serialized.

I know it doesn't support most of same options the cool kids are used to yet.