# `LibOss.Core.ResponseParser`
[🔗](https://github.com/tt67wq/lib-oss/blob/main/lib/lib_oss/core/response_parser.ex#L1)

响应解析模块，负责XML响应解析、错误处理和数据提取

# `extract_acl_info`

```elixir
@spec extract_acl_info(any()) :: map()
```

提取ACL信息

## 参数
- xml: 解析后的XML结构

## 返回值
- ACL信息结构

# `extract_from_xml`

```elixir
@spec extract_from_xml(any(), binary()) :: any()
```

从XML中提取指定路径的值

## 参数
- xml: 解析后的XML结构
- path: 要提取的XML路径

## 返回值
- 提取的值或nil

# `extract_multipart_info`

```elixir
@spec extract_multipart_info(any()) :: map()
```

提取分片上传信息

## 参数
- xml: 解析后的XML结构

## 返回值
- 分片上传信息结构

# `extract_object_list`

```elixir
@spec extract_object_list(any()) :: map()
```

提取对象列表信息

## 参数
- xml: 解析后的XML结构

## 返回值
- 对象列表信息结构

# `extract_tags`

```elixir
@spec extract_tags(any()) :: list()
```

提取标签信息

## 参数
- xml: 解析后的XML结构

## 返回值
- 标签列表

# `parse_error_response`

```elixir
@spec parse_error_response(binary(), integer(), list()) ::
  {:error, LibOss.Exception.t()}
```

解析错误响应

## 参数
- body: 响应体内容
- status_code: HTTP状态码
- headers: 响应头

## 返回值
- `{:error, Exception.t()}`

# `parse_response`

```elixir
@spec parse_response(LibOss.Model.Http.Response.t()) ::
  {:ok, any()} | {:error, LibOss.Exception.t()}
```

解析HTTP响应

## 参数
- response: HTTP响应结构

## 返回值
- `{:ok, parsed_data} | {:error, Exception.t()}`

# `parse_xml_response`

```elixir
@spec parse_xml_response(binary(), binary() | nil) :: {:ok, any()}
```

解析XML响应体

## 参数
- body: 响应体内容
- extract_path: XML路径，用于提取特定内容 (可选)

## 返回值
- `{:ok, parsed_xml} | {:error, Exception.t()}`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
