use rustical_xml::{Unparsed, XmlDeserialize, XmlDocument, XmlRootTag}; #[test] fn test_propertyupdate() { #[derive(XmlDeserialize)] struct SetPropertyElement { #[allow(dead_code)] prop: T, } #[derive(XmlDeserialize)] struct TagName { #[xml(ty = "tag_name")] #[allow(dead_code)] name: String, } #[derive(XmlDeserialize)] struct PropertyElement { #[xml(ty = "untagged")] #[allow(dead_code)] property: TagName, } #[derive(XmlDeserialize)] struct RemovePropertyElement { #[allow(dead_code)] prop: PropertyElement, } #[derive(XmlDeserialize)] enum Operation { Set(SetPropertyElement), #[allow(dead_code)] Remove(RemovePropertyElement), } #[derive(XmlDeserialize, XmlRootTag)] #[xml(root = b"propertyupdate")] struct PropertyupdateElement { #[xml(ty = "untagged", flatten)] #[allow(dead_code)] operations: Vec>, } PropertyupdateElement::::parse_str( r#" Hello "#, ) .unwrap(); }