Saxy v1.3.0 Saxy.XML View Source

Helper functions for building XML elements.

Link to this section Summary

Functions

Builds CDATA in simple form

Builds characters in simple form

Builds comment in simple form

Builds element in simple form

Builds empty element in simple form

Builds processing instruction in simple form

Builds reference in simple form

Link to this section Types

Link to this type cdata() View Source
cdata() :: {:cdata, String.t()}
Link to this type characters() View Source
characters() :: {:characters, String.t()}
Link to this type comment() View Source
comment() :: {:comment, String.t()}
Link to this type content() View Source
content() :: element() | characters() | cdata() | ref() | comment()
Link to this type dec_ref() View Source
dec_ref() :: {:reference, {:decimal, integer()}}
Link to this type element() View Source
element() ::
  {name :: String.t(), attributes :: [{key :: String.t(), value :: String.t()}],
   children :: [content()]}
Link to this type entity_ref() View Source
entity_ref() :: {:reference, {:entity, String.t()}}
Link to this type hex_ref() View Source
hex_ref() :: {:reference, {:hexadecimal, integer()}}
Link to this type processing_instruction() View Source
processing_instruction() ::
  {:processing_instruction, name :: String.t(), instruction :: String.t()}

Link to this section Functions

Link to this function cdata(text) View Source
cdata(text :: term()) :: cdata()

Builds CDATA in simple form.

Link to this function characters(text) View Source
characters(text :: term()) :: characters()

Builds characters in simple form.

Link to this function comment(text) View Source
comment(text :: term()) :: comment()

Builds comment in simple form.

Link to this function element(name, attributes, children) View Source
element(
  name :: term(),
  attributes :: [{key :: term(), value :: term()}],
  children :: list()
) :: element()

Builds element in simple form.

Link to this function empty_element(name, attributes) View Source
empty_element(name :: term(), attributes :: [{key :: term(), value :: term()}]) ::
  element()

Builds empty element in simple form.

Link to this function processing_instruction(name, instruction) View Source
processing_instruction(name :: String.t(), instruction :: String.t()) ::
  processing_instruction()

Builds processing instruction in simple form.

Link to this function reference(character_type, name) View Source
reference(character_type :: :entity | :hexadecimal | :decimal, value :: term()) ::
  ref()

Builds reference in simple form.