Protocol for rendering data structures to SVG internal representations.
This protocol is responsible for converting Vectored element structs into
the format expected by Erlang's :xmerl.
Most users will interact with Vectored.to_svg_string/1 instead of calling
this protocol directly.
Format
The rendered format is typically a tuple: {tag_name, attributes, children}.
tag_nameis an atom (e.g.,:circle).attributesis a keyword list of{atom, value}pairs.childrenis a list of rendered elements or text nodes.
Summary
Functions
Render an element as xmerl-compatible XML structures.
Types
@type simple_element() :: {atom(), [{atom(), iolist() | atom() | integer()}], [simple_element()]} | {atom(), [simple_element()]} | atom() | iolist() | :xmerl.element()
@type t() :: term()
All the types that implement this protocol.
Functions
@spec to_svg(t()) :: simple_element() | :xmerl.xmlElement()
Render an element as xmerl-compatible XML structures.