pub fn try_select(&self, sel: &str) -> Option<Selection> {
        match Matcher::new(sel) {
            Ok(matcher) => {
                let root = self.tree.root();
                let nodes: Vec<Node> =
                    Matches::from_one(root, matcher.clone(), MatchScope::ChildrenOnly).collect();
                if nodes.len() > 0 {
                    Some(Selection { nodes })
                } else {
                    None
                }
            }
            Err(_) => None,
        }
    }
/// Gets the descendants of the root document node in the current, filter by a selector.
/// It returns a new selection object containing these matched elements.
Gets the descendants of the root document node in the current, filter by a selector.
It returns a new selection object containing these matched elements.
Gets the descendants of the root document node in the current filter by a selector . It returns a new selection object containing these matched elements .
pub fn try_select(&self, sel: &str) -> Option<Selection> {
        match Matcher::new(sel) {
            Ok(matcher) => {
                let root = self.tree.root();
                let nodes: Vec<Node> =
                    Matches::from_one(root, matcher.clone(), MatchScope::ChildrenOnly).collect();
                if nodes.len() > 0 {
                    Some(Selection { nodes })
                } else {
                    None
                }
            }
            Err(_) => None,
        }
    }
pub fn try_select ( & self , sel : & str ) -> Option < Selection > { match Matcher :: new ( sel ) { Ok ( matcher ) => { let root = self . tree . root ( ) ; let nodes : Vec < Node > = Matches :: from_one ( root , matcher . clone ( ) , MatchScope :: ChildrenOnly ) . collect ( ) ; if nodes . len ( ) > 0 { Some ( Selection { nodes } ) } else { None } } Err ( _ ) => None , } }
Gets the descendants of the root document node in the current, filter by a selector.
Gets the descendants of the root document node in the current filter by a selector .
&self
sel
&str
&self
sel
&str