-
Notifications
You must be signed in to change notification settings - Fork 267
Closed as duplicate of#674
Labels
arraysIssues related to mapping XML content onto arrays using serdeIssues related to mapping XML content onto arrays using serdebughelp wantedserdeIssues related to mapping from Rust types to XMLIssues related to mapping from Rust types to XML
Description
Despite the documentation explicitly mentioning that "According to the XML Schema specification, delimiters for elements is one or more space ( , \r, \n, and \t) character(s).", ListIter only actually splits on (space): simple_type.rs.
Reproducer:
use serde::Deserialize;
use quick_xml::de::from_str;
#[derive(Deserialize)]
struct Root {
#[serde(rename = "$text")]
items: Vec<String>,
}
fn main() {
const TEST_XML: &str = "<Root>one two\nthree four\tfive six</Root>";
let root: Root = from_str(TEST_XML).unwrap();
assert_eq!(
root.items,
["one", "two", "three", "four", "five", "six"]
);
// assertion `left == right` failed
// left: ["one", "two\nthree", "four\tfive", "six"]
// right: ["one", "two", "three", "four", "five", "six"]
}Metadata
Metadata
Assignees
Labels
arraysIssues related to mapping XML content onto arrays using serdeIssues related to mapping XML content onto arrays using serdebughelp wantedserdeIssues related to mapping from Rust types to XMLIssues related to mapping from Rust types to XML