Prefix-agnostic access to parsed SOAP documents.
Lather.Xml.Parser keeps namespace prefixes in element names, so the
same envelope can arrive as "soap:Envelope", "soapenv:Envelope",
"SOAP-ENV:Envelope", "s:Envelope" or plain "Envelope" depending on
the peer. The functions here look elements up by local name so callers
do not have to enumerate prefixes.
Summary
Functions
Finds the child of map whose local name is local.
Returns the value of the child of map with local name local, or
nil.
Walks a path of local names, like get_in/2 but prefix-agnostic and
safe against non-map intermediate values.
Returns the local part of a possibly prefixed element name.
Returns the namespace URI declared for element_key's prefix on
element (a parsed element map), or nil.
Returns the prefix of an element name, or nil when it has none.
SOAP 1.1 envelope namespace URI.
SOAP 1.2 envelope namespace URI.
Detects the SOAP version of a parsed document from the namespace bound
to the Envelope element. Falls back to the fault structure (SOAP 1.2
faults carry Code/Value) and finally to :v1_1.
Functions
Finds the child of map whose local name is local.
Returns {key, value} with the actual (possibly prefixed) key, or
nil when there is no such child or map is not a map. An exact key
match wins over a prefixed one; attribute keys (@...) and #text are
never matched.
Returns the value of the child of map with local name local, or
nil.
Walks a path of local names, like get_in/2 but prefix-agnostic and
safe against non-map intermediate values.
Elements.get_in(parsed, ["Envelope", "Body", "Fault"])
Returns the local part of a possibly prefixed element name.
iex> Lather.Soap.Elements.local_name("soapenv:Body")
"Body"
iex> Lather.Soap.Elements.local_name("Body")
"Body"
Returns the namespace URI declared for element_key's prefix on
element (a parsed element map), or nil.
Looks for @xmlns:prefix when the key is prefixed and @xmlns when it
is not.
Returns the prefix of an element name, or nil when it has none.
SOAP 1.1 envelope namespace URI.
SOAP 1.2 envelope namespace URI.
@spec soap_version(map()) :: :v1_1 | :v1_2
Detects the SOAP version of a parsed document from the namespace bound
to the Envelope element. Falls back to the fault structure (SOAP 1.2
faults carry Code/Value) and finally to :v1_1.