diff --git a/parsers/src/disco.rs b/parsers/src/disco.rs index 9e4957a1..9ee4a5fb 100644 --- a/parsers/src/disco.rs +++ b/parsers/src/disco.rs @@ -57,7 +57,7 @@ pub struct Identity { pub type_: String, /// Lang of the name of this identity. - #[xml(attribute(default, name = "xml:lang"))] + #[xml(lang(default))] pub lang: Option, /// Name of this identity. diff --git a/parsers/src/presence.rs b/parsers/src/presence.rs index 67634ddc..2242e8de 100644 --- a/parsers/src/presence.rs +++ b/parsers/src/presence.rs @@ -139,7 +139,7 @@ impl AsOptionalXmlText for Type { /// The main structure representing the `` stanza. #[derive(FromXml, AsXml, Debug, Clone, PartialEq)] -#[xml(namespace = ns::DEFAULT_NS, name = "presence", discard(attribute = "xml:lang"))] +#[xml(namespace = ns::DEFAULT_NS, name = "presence")] pub struct Presence { /// The sender of this presence. #[xml(attribute(default))] diff --git a/parsers/src/stream.rs b/parsers/src/stream.rs index 0e8f9292..1a6c9178 100644 --- a/parsers/src/stream.rs +++ b/parsers/src/stream.rs @@ -32,7 +32,7 @@ pub struct Stream { /// The default human language for all subsequent stanzas, which will /// be transmitted to other entities for better localisation. - #[xml(attribute(default, name = "xml:lang"))] + #[xml(lang(default))] xml_lang: Option, } diff --git a/parsers/src/websocket.rs b/parsers/src/websocket.rs index 6281da84..e448ee08 100644 --- a/parsers/src/websocket.rs +++ b/parsers/src/websocket.rs @@ -32,7 +32,7 @@ pub struct Open { /// The default human language for all subsequent stanzas, which will /// be transmitted to other entities for better localisation. - #[xml(attribute(default, name = "xml:lang"))] + #[xml(lang(default))] pub xml_lang: Option, }