ExStorageServiceSdk.XmlParser (ex_storage_service_sdk v0.7.1)

Copy Markdown View Source

Bounded S3 XML response parser using binary element names.

Parses standard S3 XML responses into Elixir maps.

Summary

Functions

Parses an S3 Error XML response.

Parses a ListAllMyBucketsResult XML response.

Parses a ListBucketResult (V2) XML response.

Functions

parse_error(xml)

Parses an S3 Error XML response.

Returns {:ok, %{code: String, message: String}} or :error.

parse_list_buckets(xml)

Parses a ListAllMyBucketsResult XML response.

Returns a list of bucket maps with :name and :creation_date keys.

parse_list_objects(xml)

Parses a ListBucketResult (V2) XML response.

Returns a map with:

  • :contents - list of object maps
  • :common_prefixes - list of prefix strings
  • :is_truncated - boolean
  • :next_continuation_token - string or nil
  • :key_count - integer