diff --git a/src/lib.rs b/src/lib.rs index 30ba7f7..f0280d9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -363,7 +363,7 @@ impl Jid { extern crate minidom; #[cfg(feature = "minidom")] -use minidom::IntoAttributeValue; +use minidom::{IntoAttributeValue, IntoElements, ElementEmitter}; #[cfg(feature = "minidom")] impl IntoAttributeValue for Jid { @@ -372,6 +372,13 @@ impl IntoAttributeValue for Jid { } } +#[cfg(feature = "minidom")] +impl IntoElements for Jid { + fn into_elements(self, emitter: &mut ElementEmitter) { + emitter.append_text_node(String::from(self)) + } +} + #[cfg(test)] mod tests { use super::*;