Lather.Xml.Parser (lather v1.0.42)
View SourceXML parser for processing SOAP responses.
Provides functionality to parse XML documents into Elixir data structures, specifically optimized for SOAP response parsing.
Summary
Functions
Extracts all attributes from an XML element.
Extracts text content from an XML element.
Parses XML string into an Elixir data structure.
Functions
Extracts all attributes from an XML element.
Extracts text content from an XML element.
Parses XML string into an Elixir data structure.
Parameters
xml_string- XML content as a string
Returns
{:ok, parsed_data}- Successfully parsed XML as a map{:error, reason}- Parsing error
Examples
iex> xml = "<?xml version=\"1.0\"?><root><item>value</item></root>"
iex> Parser.parse(xml)
{:ok, %{"root" => %{"item" => "value"}}}