diff --git a/crates/xml/derive/src/xml_enum/impl_prop_name.rs b/crates/xml/derive/src/xml_enum/impl_prop_name.rs index cee4b0c..469b7e6 100644 --- a/crates/xml/derive/src/xml_enum/impl_prop_name.rs +++ b/crates/xml/derive/src/xml_enum/impl_prop_name.rs @@ -92,10 +92,17 @@ impl Enum { let prop_name_variants = tagged_variants.iter().map(|variant| { let ident = &variant.variant.ident; + let xml_name = variant.xml_name(); if let Some(proptype) = &variant.attrs.prop { - quote! {#ident(#proptype)} + quote! { + #[xml(rename = #xml_name)] + #ident(#proptype) + } } else { - quote! {#ident} + quote! { + #[xml(rename = #xml_name)] + #ident + } } });