[]
= "quick-xml"
= "0.28.1"
= "High performance xml reader and writer"
= "2018"
= "https://docs.rs/quick-xml"
= "https://github.com/tafia/quick-xml"
= ["xml", "serde", "parser", "writer", "html"]
= ["asynchronous", "encoding", "parsing", "parser-implementations"]
= "MIT"
= "1.52"
= ["src/*", "LICENSE-MIT.md", "README.md"]
[]
= { = "0.2", = true }
= { = "0.8", = true }
= { = "1.0.100", = true }
= { = "1.10", = true, = false, = ["io-util"] }
= "2.1"
= { = "1.2.3", = ["derive"], = true }
[]
= "0.4"
= "1.3"
= "1"
# #[serde(other)] allowed not only inside field_identifier since 1.0.79
# serde does not follow semver in numbering and their dependencies, so we specifying patch here
= { = "1.0.79" }
= "0.7"
= { = "1.21", = false, = ["macros", "rt"] }
= "0.4"
[]
= false
[[]]
= "microbenches"
= false
= "benches/microbenches.rs"
[[]]
= "macrobenches"
= false
= "benches/macrobenches.rs"
[]
= []
## Enables support for asynchronous reading from `tokio`'s IO-Traits by enabling
## [reading events] from types implementing [`tokio::io::AsyncBufRead`].
##
## [reading events]: crate::reader::Reader::read_event_into_async
= ["tokio"]
## Enables support of non-UTF-8 encoded documents. Encoding will be inferred from
## the XML declaration if it will be found, otherwise UTF-8 is assumed.
##
## Currently, only ASCII-compatible encodings are supported, so, for example,
## UTF-16 will not work (therefore, `quick-xml` is not [standard compliant]).
##
## Thus, quick-xml supports all encodings of [`encoding_rs`] except these:
## - [UTF-16BE]
## - [UTF-16LE]
## - [ISO-2022-JP]
##
## You should stop to process document when one of that encoding will be detected,
## because generated events can be wrong and do not reflect a real document structure!
##
## Because there is only supported encodings that is not ASCII compatible, you can
## check for that to detect them:
##
## ```
## use quick_xml::events::Event;
## use quick_xml::reader::Reader;
##
## # fn to_utf16le_with_bom(string: &str) -> Vec<u8> {
## # let mut bytes = Vec::new();
## # bytes.extend_from_slice(&[0xFF, 0xFE]); // UTF-16 LE BOM
## # for ch in string.encode_utf16() {
## # bytes.extend_from_slice(&ch.to_le_bytes());
## # }
## # bytes
## # }
## let xml = to_utf16le_with_bom(r#"<?xml encoding='UTF-16'><element/>"#);
## let mut reader = Reader::from_reader(xml.as_ref());
## reader.trim_text(true);
##
## let mut buf = Vec::new();
## let mut unsupported = false;
## loop {
## if !reader.decoder().encoding().is_ascii_compatible() {
## unsupported = true;
## break;
## }
## buf.clear();
## match reader.read_event_into(&mut buf).unwrap() {
## Event::Eof => break,
## _ => {}
## }
## }
## assert_eq!(unsupported, true);
## ```
## That restriction will be eliminated once issue [#158] is resolved.
##
## [standard compliant]: https://www.w3.org/TR/xml11/#charencoding
## [UTF-16BE]: encoding_rs::UTF_16BE
## [UTF-16LE]: encoding_rs::UTF_16LE
## [ISO-2022-JP]: encoding_rs::ISO_2022_JP
## [#158]: https://github.com/tafia/quick-xml/issues/158
= ["encoding_rs"]
## Enables support for recognizing all [HTML 5 entities] in [`unescape`] and
## [`unescape_with`] functions. The full list of entities also can be found in
## <https://html.spec.whatwg.org/entities.json>.
##
## [HTML 5 entities]: https://dev.w3.org/html5/html-author/charref
## [`unescape`]: crate::escape::unescape
## [`unescape_with`]: crate::escape::unescape_with
= []
## This feature for a serde deserializer that enables support for deserializing
## lists where tags are overlapped with tags that do not correspond to the list.
##
## When this feature is enabled, the XML:
## ```xml
## <any-name>
## <item/>
## <another-item/>
## <item/>
## <item/>
## </any-name>
## ```
## could be deserialized to a struct:
## ```no_run
## # use serde::Deserialize;
## #[derive(Deserialize)]
## #[serde(rename_all = "kebab-case")]
## struct AnyName {
## item: Vec<()>,
## another_item: (),
## }
## ```
##
## When this feature is not enabled (default), only the first element will be
## associated with the field, and the deserialized type will report an error
## (duplicated field) when the deserializer encounters a second `<item/>`.
##
## Note, that enabling this feature can lead to high and even unlimited memory
## consumption, because deserializer should check all events up to the end of a
## container tag (`</any-name>` in that example) to figure out that there are no
## more items for a field. If `</any-name>` or even EOF is not encountered, the
## parsing will never end which can lead to a denial-of-service (DoS) scenario.
##
## Having several lists and overlapped elements for them in XML could also lead
## to quadratic parsing time, because the deserializer must check the list of
## events as many times as the number of sequence fields present in the schema.
##
## To reduce negative consequences, always [limit] the maximum number of events
## that [`Deserializer`] will buffer.
##
## This feature works only with `serialize` feature and has no effect if `serialize`
## is not enabled.
##
## [limit]: crate::de::Deserializer::event_buffer_size
## [`Deserializer`]: crate::de::Deserializer
= []
## Enables serialization of some types using [`serde`]. Probably your rarely will
## need this feature enabled.
##
## This feature does NOT provide XML serializer or deserializer. You should use
## the `serialize` feature for that instead.
# Cannot name "serde" to avoid clash with dependency.
# "dep:" prefix only avalible from Rust 1.60
= ["serde/derive"]
## Enables support for [`serde`] serialization and deserialization. When this
## feature is enabled, quick-xml provides serializer and deserializer for XML.
##
## This feature does NOT enables serializaton of the types inside quick-xml.
## If you need that, use the `serde-types` feature.
= ["serde"] # "dep:" prefix only avalible from Rust 1.60
[]
# document all features
= true
# defines the configuration attribute `docs_rs` to enable feature requirements
# See https://stackoverflow.com/questions/61417452
= ["--cfg", "docs_rs"]
# Tests, benchmarks and examples doesn't included in package on crates.io,
# so we need to specify a path, otherwise `cargo package` complains
[[]]
= "encodings"
= ["encoding"]
= "tests/encodings.rs"
[[]]
= "serde_roundtrip"
= ["serialize"]
= "tests/serde_roundtrip.rs"
[[]]
= "serde-de"
= ["serialize"]
= "tests/serde-de.rs"
[[]]
= "serde-se"
= ["serialize"]
= "tests/serde-se.rs"
[[]]
= "serde-migrated"
= ["serialize"]
= "tests/serde-migrated.rs"
[[]]
= "serde-issues"
= ["serialize"]
= "tests/serde-issues.rs"
[[]]
= "async-tokio"
= ["async-tokio"]
= "tests/async-tokio.rs"
[[]]
= "read_nodes_serde"
= ["serialize"]
= "examples/read_nodes_serde.rs"