pub fn has_tag_name<N>(&self, name: N) -> bool
    where
        N: Into<QName>,
    {
        let name = name.into();

        match self.d().node_type {
            NodeType::Element { ref qname, .. } => {
                let qname = &self.document.qnames[qname.get_usize()];
                match name.ns {
                    Some(_) => qname == &name,
                    None => qname.name == name.name,
                }
            }
            _ => false,
        }
    }
/// Checks that node has a specified tag name.
///
/// # Examples
///
/// ```
/// let doc = smop_xmltree::nod::Document::parse("<e xmlns='http://www.w3.org'/>").unwrap();
///
/// assert!(doc.root_element().has_tag_name("e"));
/// assert!(doc.root_element().has_tag_name(("http://www.w3.org", "e")));
///
/// assert!(!doc.root_element().has_tag_name("b"));
/// assert!(!doc.root_element().has_tag_name(("http://www.w4.org", "e")));
/// ```
Checks that node has a specified tag name.
Checks that node has a specified tag name .
pub fn has_tag_name<N>(&self, name: N) -> bool
    where
        N: Into<QName>,
    {
        let name = name.into();
        match self.d().node_type {
            NodeType::Element { ref qname, .. } => {
                let qname = &self.document.qnames[qname.get_usize()];
                match name.ns {
                    Some(_) => qname == &name,
                    None => qname.name == name.name,
                }
            }
            _ => false,
        }
    }
pub fn has_tag_name < N > ( & self , name : N ) -> bool where N : Into < QName > , { let name = name . into ( ) ; match self . d ( ) . node_type { NodeType :: Element { ref qname , .. } => { let qname = & self . document . qnames [ qname . get_usize ( ) ] ; match name . ns { Some ( _ ) => qname == & name , None => qname . name == name . name , } } _ => false , } }
Checks that node has a specified tag name.
Checks that node has a specified tag name .
&self
name
N
examples
```
let doc = smop_xmltree::nod::Document::parse("").unwrap().




` ` ` let doc = smop_xmltree :: nod :: Document :: parse ( " " ) . unwrap () .