diff --git a/src/element.rs b/src/element.rs index 4494d41..b2cde3a 100644 --- a/src/element.rs +++ b/src/element.rs @@ -192,6 +192,17 @@ impl Element { } /// Returns a reference to the prefix of this element. + /// + /// # Examples + /// ```rust + /// use minidom::Element; + /// + /// let elem = Element::builder("prefix:name") + /// .build(); + /// + /// assert_eq!(elem.name(), "name"); + /// assert_eq!(elem.prefix(), Some("prefix".to_owned())); + /// ``` pub fn prefix(&self) -> Option { self.prefix.clone() }