EctoXml.to_partial_xml
You're seeing just the function
to_partial_xml
, go back to EctoXml module for more information.
Link to this function
to_partial_xml(data, options \\ [])
Specs
Generates a partial XML element based on one ecto schema or map.
The behaviour is idential to to_xml/3, except that it does not generate the XML document (e.g. <?xml version=X encoding=Y?>) with a root element name (e.g. <root> content </root>), generating only the partial element instead.
Example
The following:
%{foo: "bar"} |> EctoXml.to_partial_xml()
Results in:
<foo>bar</foo>
Check to_xml/3 for more examples and use cases.