Module exml

Copyright © (C) 2011-2021, Erlang Solutions Ltd.

Data Types

attr()

attr() = {binary(), binary()}

cdata()

cdata() = #xmlcdata{}

element()

element() = #xmlel{}

item()

item() = element() | attr() | cdata() | exml_stream:start() | exml_stream:stop()

Function Index

parse/1
to_binary/1
to_iolist/1
to_list/1
to_pretty_iolist/1
xml_size/1
xml_sort/1Sort a (list of) xmlel().

Function Details

parse/1

parse(XML::binary() | [binary()]) -> {ok, exml:element()} | {error, any()}

to_binary/1

to_binary(Element::element() | [exml_stream:element()]) -> binary()

to_iolist/1

to_iolist(Element::element() | [exml_stream:element()]) -> iodata()

to_list/1

to_list(Element::element() | [exml_stream:element()]) -> string()

to_pretty_iolist/1

to_pretty_iolist(Element::element() | [exml_stream:element()]) -> iodata()

xml_size/1

xml_size(Rest::item() | [item()]) -> non_neg_integer()

xml_sort/1

xml_sort(Xmlcdata::item() | [item()]) -> item() | [item()]

Sort a (list of) xmlel().

Sorting is defined as calling lists:sort/1 at: * all the xmlels 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.

The implementation of this function is a subtle modification of https://github.com/erszcz/rxml/commit/e8483408663f0bc2af7896e786c1cdea2e86e43d


Generated by EDoc