Saxy. XML
(Saxy v1.7.0)
View Source
Helper functions for building XML elements.
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.
Types
@type cdata() :: {:cdata, String.t()}
@type characters() :: {:characters, String.t()}
@type comment() :: {:comment, String.t()}
@type dec_ref() :: {:reference, {:decimal, integer()}}
@type entity_ref() :: {:reference, {:entity, String.t()}}
@type hex_ref() :: {:reference, {:hexadecimal, integer()}}
@type ref() :: entity_ref() | hex_ref() | dec_ref()
Functions
Builds CDATA in simple form.
The encoder splits text containing ]]> into adjacent CDATA sections,
preserving the text when parsed.
@spec characters(text :: term()) :: characters()
Builds characters in simple form.
Builds comment in simple form.
The encoder raises ArgumentError if the text contains -- and appends a
space if the text ends in a single hyphen.
@spec element( name :: term(), attributes :: [{key :: term(), value :: term()}], children :: term() ) :: element()
Builds element in simple form.
Builds empty element in simple form.
@spec processing_instruction(name :: String.t(), instruction :: String.t()) :: processing_instruction()
Builds processing instruction in simple form.
When encoded, the target must be an XML Name other than xml (in any case),
and the instruction must not contain ?>. The encoder raises ArgumentError
for invalid processing instructions.
Builds reference in simple form.