Braintree.XML.Encoder (Braintree v0.13.0)
XML encoding tailored to dumping Braintree compatible params.
Link to this section Summary
Link to this section Types
Link to this type
xml()
@type xml() :: binary()
Link to this section Functions
Link to this function
dump(map)
Converts a map into the equivalent XML representation.
examples
Examples
iex> Braintree.XML.Encoder.dump(%{a: %{b: 1, c: 2}})
~s|<?xml version="1.0" encoding="UTF-8" ?>\n<a>\n<b>1</b>\n<c>2</c>\n</a>|
iex> Braintree.XML.Encoder.dump(%{a: %{b: "<tag>"}})
~s|<?xml version="1.0" encoding="UTF-8" ?>\n<a>\n<b><tag></b>\n</a>|