@@ -42,6 +42,52 @@ default = []
4242# # [standard compliant]: https://www.w3.org/TR/xml11/#charencoding
4343encoding = [" encoding_rs" ]
4444
45+ # # This feature enables support for deserializing lists where tags are overlapped
46+ # # with tags that do not correspond to the list.
47+ # #
48+ # # When this feature is enabled, the XML:
49+ # # ```xml
50+ # # <any-name>
51+ # # <item/>
52+ # # <another-item/>
53+ # # <item/>
54+ # # <item/>
55+ # # </any-name>
56+ # # ```
57+ # # could be deserialized to a struct:
58+ # # ```ignore
59+ # # #[derive(Deserialize)]
60+ # # #[serde(rename_all = "kebab-case")]
61+ # # struct AnyName {
62+ # # item: Vec<()>,
63+ # # another_item: (),
64+ # # }
65+ # # ```
66+ # #
67+ # # When this feature is not enabled (default), only the first element will be
68+ # # associated with the field, and the deserialized type will report an error
69+ # # (duplicated field) when the deserializer encounters a second `<item/>`.
70+ # #
71+ # # Note, that enabling this feature can lead to high and even unlimited memory
72+ # # consumption, because deserializer should check all events up to the end of a
73+ # # container tag (`</any-name>` in that example) to figure out that there are no
74+ # # more items for a field. If `</any-name>` or even EOF is not encountered, the
75+ # # parsing will never end which can lead to a denial-of-service (DoS) scenario.
76+ # #
77+ # # Having several lists and overlapped elements for them in XML could also lead
78+ # # to quadratic parsing time, because the deserializer must check the list of
79+ # # events as many times as the number of sequence fields present in the schema.
80+ # #
81+ # # To reduce negative consequences, always [limit] the maximum number of events
82+ # # that [`Deserializer`] will buffer.
83+ # #
84+ # # This feature works only with `serialize` feature and has no effect if `serialize`
85+ # # is not enabled.
86+ # #
87+ # # [limit]: crate::de::Deserializer::event_buffer_size
88+ # # [`Deserializer`]: crate::de::Deserializer
89+ overlapped-lists = []
90+
4591# # Enables support for [`serde`] serialization and deserialization
4692serialize = [" serde" ]
4793
0 commit comments