View Source exml (exml v3.4.1)
Summary
Functions
Parses a binary or a list of binaries into an XML
element/0
.Equivalent to to_iolist(Element, not_pretty).
Equivalent to erlang:binary_to_list(to_binary(Element)).
Equivalent to to_iolist(Element, pretty).
Calculate the length of the original XML payload
Sort in ascending order a list of xml item/0
.
Types
-type attr() :: {binary(), binary()}.
-type cdata() :: #xmlcdata{}.
-type element() :: #xmlel{}.
-type item() :: element() | attr() | cdata() | exml_stream:start() | exml_stream:stop().
-type prettify() :: pretty | not_pretty.
Functions
-spec parse(binary() | [binary()]) -> {ok, exml:element()} | {error, any()}.
element/0
.
-spec to_binary(exml_stream:element() | [exml_stream:element()]) -> binary().
Equivalent to erlang:iolist_to_binary(to_iolist(Element, not_pretty)).
-spec to_iolist(exml_stream:element() | [exml_stream:element()]) -> iodata().
Equivalent to to_iolist(Element, not_pretty).
-spec to_list(exml_stream:element() | [exml_stream:element()]) -> string().
Equivalent to erlang:binary_to_list(to_binary(Element)).
-spec to_pretty_iolist(exml_stream:element() | [exml_stream:element()]) -> iodata().
Equivalent to to_iolist(Element, pretty).
Sort in ascending order a list of xml item/0
.
lists:sort/1
at:- all the
xmlel
s provided (if there is a list of them) AND - all the
xmlel
elements' attributes recursively (the root and descendants) AND - all the
xmlel
children recursively (the root and descendants).