View Source exml (exml v3.3.4)
Summary
Functions
Equivalent to to_iolist(Element, not_pretty).
Equivalent to erlang:binary_to_list(to_binary(Element)).
Equivalent to to_iolist(Element, pretty).
Sort a (list of) xmlel()
.
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()}.
-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 a (list of) xmlel()
.
Sorting is defined as calling 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). The order is ascending.