Lather.Xml.Builder (lather v1.0.4)
View SourceXML builder for creating SOAP envelopes.
Provides functionality to build XML documents from Elixir data structures, specifically optimized for SOAP envelope construction.
Summary
Functions
Builds XML from the given data structure.
Builds XML from a data structure without XML declaration.
Builds XML string from a map structure.
Escapes XML special characters in text content.
Functions
Builds XML from the given data structure.
Parameters
data- Elixir data structure (map) to convert to XML
Examples
iex> {:ok, xml} = Lather.Xml.Builder.build(%{"soap:Envelope" => %{"soap:Body" => %{"operation" => %{}}}})
iex> String.contains?(xml, "<soap:Envelope>")
true
iex> String.contains?(xml, "<operation/>")
true
Builds XML from a data structure without XML declaration.
Useful for building fragments that will be embedded in larger documents.
Builds XML string from a map structure.
Escapes XML special characters in text content.