Help with mixed sequence with attributes?
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start by reading the deserialization guide and tests for overlapped-lists, then compare how the XML element names map to the Rust field names in the supplied structs. Reproduce the reported None values with the example XML; done means identifying whether the field naming or list handling causes the mismatch and documenting a working approach or a focused fix. The issue has had no reply for over two years.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi there! Thank you for the excellent library.
I'm quite stuck and I was hoping someone might be able to help me. I'm trying to switch to quick-xml from serde-xml-rs and I've got everything switched except this last bit. I've got some XML that looks like this (excuse the escaped quotes):
<ifi-parties>
<ifi-standardized-name country=\"CH\" type=\"U.S. Company or Corporation\" number=\"070058\">
<addressbook>
<name>Company Name</name>
</addressbook>
</ifi-standardized-name>
<ifi-standardized-name-current country=\"CH\" number=\"070058\">
<addressbook>
<name>Company Name</name>
</addressbook>
</ifi-standardized-name-current>
</ifi-parties>
There's more deserialisation code, but the relevant bits are:
#[derive(Debug, Deserialize, PartialEq, NifMap)]
struct IfiParties {
ifi_standardized_name: Option<Vec<IfiStandardizedName>>,
ifi_standardized_name_current: Option<Vec<IfiStandardizedNameCurrent>>,
ifi_standardized_name_probable: Option<Vec<IfiStandardizedNameProbable>>,
}
#[derive(Debug, Deserialize, PartialEq, NifMap)]
struct IfiStandardizedName {
#[serde(rename = "@country")]
country: Option<String>,
#[serde(rename = "@type")]
r#type: Option<String>,
#[serde(rename = "@number")]
number: Option<u64>,
addressbook: Addressbook,
}
#[derive(Debug, Deserialize, PartialEq, NifMap)]
struct IfiStandardizedNameCurrent {
#[serde(rename = "@country")]
country: Option<String>,
#[serde(rename = "@type")]
r#type: Option<String>,
#[serde(rename = "@number")]
number: Option<u64>,
addressbook: Addressbook,
}
#[derive(Debug, Deserialize, PartialEq, NifMap)]
struct IfiStandardizedNameProbable {
#[serde(rename = "@country")]
country: Option<String>,
#[serde(rename = "@type")]
r#type: Option<String>,
#[serde(rename = "@number")]
addressbook: Addressbook,
}
#[derive(Debug, Deserialize, PartialEq, NifMap)]
struct Addressbook {
#[serde(rename = "$value", default)]
name: String,
}
No matter what I do, I'm getting None for ifi_standardized_name, ifi_standardized_name_current, and ifi_standardized_name_probable. I've got overlapped-lists enabled. If I rename them to kebab-case, I get a deserialization error. I'm at a loss here and am not really sure how to figure it out, so I was hoping someone might be able to point out something obvious I'm doing wrong here.
Thank you in advance!
- Ngôn ngữ chính
- Rust
- Star
- 1.6k
- Fork
- 299
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tafia/quick-xml
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
DecodingReader::set_encoding panics when the XML declaration is longer than 64 bytesCó thể đã có người làm @emschwartz đã nhận 4 ngày trước. Đang mởbug encoding
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
tafia/quick-xml#1040 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
encoding optimization
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
tafia/quick-xml#1039 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
optimization question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 53/100
tafia/quick-xml#1035 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của tafia/quick-xml
Issue tương tự
-
priority: medium ready
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
TusanHomichi/PSIV#646 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug lab rust-mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cli good first issue help wanted needs translation priority:P2 type:documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
SpecterAoD/pqkeep#226 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Flaky on Windows: scenario_j_zero_refresh_after_triggers_background_refresh times out at 5 sĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
haowjy/mars-agents#381 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: opencode_go chat route drops reasoning_effort (even 'none'), while the same endpoint honors it via custom_llm_provider=openaiCó thể đã có người làm @arvindkumar-ship-it đã nhận hôm nay. Đang mởllm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
BerriAI/litellm#51871 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày