Braintree.XML.Entity (Braintree v0.14.0)
XML entity conversion for known entities.
Summary
Functions
Replace all escaped HTML entities, except those that would produce invalid XML
Encode all illegal XML characters by replacing them with corresponding entities.
Functions
Link to this function
decode(string)
Replace all escaped HTML entities, except those that would produce invalid XML
Examples
iex> Braintree.XML.Entity.decode("<tag>")
"<tag>"
iex> Braintree.XML.Entity.decode("Søren")
"Søren"
iex> Braintree.XML.Entity.decode("Normal")
"Normal"
iex> Braintree.XML.Entity.decode("First & Last")
"First & Last"
iex> Braintree.XML.Entity.decode(""air quotes"")
~s("air quotes")
Link to this function
encode(string)
Encode all illegal XML characters by replacing them with corresponding entities.
Examples
iex> Braintree.XML.Entity.encode("<tag>")
"<tag>"
iex> Braintree.XML.Entity.encode("Here & There")
"Here & There"