actix-xml

crates.io Documentation

XML extractor for actix-web.

This crate provides struct Xml that can be used to extract typed information from request's body.

Under the hood, quick-xml is used to parse payloads.

Example

```rust use actixweb::{web, App}; use actixxml::Xml; use serde::Deserialize;

[derive(Deserialize)]

struct Info { username: String, }

/// deserialize Info from request's body async fn index(info: Xml) -> String { format!("Welcome {}!", info.username) }

fn main() { let app = App::new().service( web::resource("/index.html").route( web::post().to(index)) ); } ```

Features

If you've removed one of the compress-* feature flag for actix-web, make sure to remove it by setting default-features=false, or it will be re-enabled for actix-web.

Version Support

License

MIT