pub fn lookup_namespace_for_uri(self, uri: &WStr) -> Option<WString> {
        for node in self.ancestors() {
            if let XmlNodeData::Element { attributes, .. } = &*node.0.read() {
                for (attr, attr_value) in attributes.iter() {
                    if attr_value == uri {
                        if attr == b"xmlns" {
                            return Some(WString::new());
                        } else if attr.starts_with(WStr::from_units(b"xmlns:")) {
                            return Some(attr[b"xmlns:".len()..].into());
                        }
                    }
                }
            }
        }

        None
    }
/// Look up the namespace for the given URI.
///
/// XML namespaces are determined by `xmlns:` namespace attributes on the
/// current node, or its parent.
///
/// If there are multiple namespaces that match the URI, the first
/// mentioned on the closest node will be returned.
Look up the namespace for the given URI.
XML namespaces are determined by `xmlns:` namespace attributes on the
current node, or its parent.

If there are multiple namespaces that match the URI, the first
mentioned on the closest node will be returned.
Look up the namespace for the given URI . XML namespaces are determined by ` xmlns : ` namespace attributes on the current node or its parent . If there are multiple namespaces that match the URI the first mentioned on the closest node will be returned .
pub fn lookup_namespace_for_uri(self, uri: &WStr) -> Option<WString> {
        for node in self.ancestors() {
            if let XmlNodeData::Element { attributes, .. } = &*node.0.read() {
                for (attr, attr_value) in attributes.iter() {
                    if attr_value == uri {
                        if attr == b"xmlns" {
                            return Some(WString::new());
                        } else if attr.starts_with(WStr::from_units(b"xmlns:")) {
                            return Some(attr[b"xmlns:".len()..].into());
                        }
                    }
                }
            }
        }
        None
    }
pub fn lookup_namespace_for_uri ( self , uri : & WStr ) -> Option < WString > { for node in self . ancestors ( ) { if let XmlNodeData :: Element { attributes , .. } = & * node . 0 . read ( ) { for ( attr , attr_value ) in attributes . iter ( ) { if attr_value == uri { if attr == b" " { return Some ( WString :: new ( ) ) ; } else if attr . starts_with ( WStr :: from_units ( b" " ) ) { return Some ( attr [ b" " . len ( ) .. ] . into ( ) ) ; } } } } } None }
Look up the namespace for the given URI.
Look up the namespace for the given URI .
self
uri
&WStr