/// Returns the value of an attribute with a given name in an XML element.
///
/// This method does a simple linear search over all attributes. This isn't
/// really an issue, as long as we never call this method on some element that
/// might have a large number of attributes.
Returns the value of an attribute with a given name in an XML element.
This method does a simple linear search over all attributes. This isn't
really an issue, as long as we never call this method on some element that
might have a large number of attributes.
Returns the value of an attribute with a given name in an XML element . This method does a simple linear search over all attributes . This isn ' t really an issue as long as we never call this method on some element that might have a large number of attributes .
fn attribute<'a>(attributes: &'a [OwnedAttribute], idx: &str) -> Option<&'a str> {
    for att in attributes {
        if att.name.local_name == idx {
            return Some(&att.value);
        }
    }
    None
}
fn attribute < ' a > ( attributes : & ' a [ OwnedAttribute ] , idx : & str ) -> Option < & ' a str > { for att in attributes { if att . name . local_name == idx { return Some ( & att . value ) ; } } None }
Returns the value of an attribute with a given name in an XML element.
Returns the value of an attribute with a given name in an XML element .
attributes
&'a [OwnedAttribute]
idx
&str