Cargo Features

fast-xml has no features set by default.

[dependencies]
fast-xml = { version = "0.23.1", features = ["encoding", "serialize", "escape-html", "document-features"] }
encoding = encoding_rs

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, fast-xml is not standard compliant).

List of supported encodings includes all encodings supported by encoding_rs crate, that satisfied the restriction above.

Affects reader::Decoder

serialize = serde

Enables support for serde serialization and deserialization

Affects errors::serialize, fast-xml::de, fast-xml::se

escape-html

Enables support for recognizing all HTML 5 entities

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml

encoding_rs encoding?
serde serialize?