View Source jhn_s3c_xml (jhn_s3c v0.3.2)

The xml encoding/decoding for S3C.

Summary

Types

-type attr() :: {atom() | binary(), undefined | binary() | atom()}.
-type cdata() :: #cdata{data :: binary()}.
-type xml() ::
          #xml{tag :: atom() | binary(), attrs :: [attr()], children :: [xml() | cdata() | binary()]}.

Functions

-spec decode(binary()) -> xml() | {error, _}.
-spec encode(xml()) -> iodata().
-spec encode(xml(), iolist | binary) -> iodata().
-spec select(_,
             #xml{tag :: atom() | binary(), attrs :: [attr()], children :: [xml() | cdata() | binary()]}) ->
                map() | [map()] | binary() | [binary()] | {error, _}.