matches(_:_:)
Test if the element meets the evaluator’s requirements.
func matches(_ root: Element, _ element: Element) throws -> Bool
<param>
<param>
<return>
false otherwise
Test if the element meets the evaluator’s requirements.
func matches(_ root: Element, _ element: Element) throws -> Bool
<param>
<param>
<return>
false otherwise
import SwiftSoup
class Evaluator
Evaluates that an element matches the selector.
class Element
@frozen struct Bool
A value type whose instances are either true
or false
.
init()
func toString() -> String
final class AllElements
Evaluator for any / all element matching
final class Attribute
Evaluator for attribute name matching
class AttributeKeyPair
Abstract evaluator for attribute name/value matching
final class AttributeStarting
Evaluator for attribute name prefix matching
final class AttributeWithValue
Evaluator for attribute name/value matching
final class AttributeWithValueContaining
Evaluator for attribute name/value matching (value containing)
final class AttributeWithValueEnding
Evaluator for attribute name/value matching (value ending)
final class AttributeWithValueMatching
Evaluator for attribute name/value matching (value regex matching)
final class AttributeWithValueNot
Evaluator for attribute name != value matching
final class AttributeWithValueStarting
Evaluator for attribute name/value matching (value prefix)
final class Class
Evaluator for element class
final class ContainsOwnText
Evaluator for matching Element’s own text
final class ContainsText
Evaluator for matching Element (and its descendants) text
class CssNthEvaluator
final class Id
Evaluator for element id
final class IndexEquals
Evaluator for matching by sibling index number (e = idx)
class IndexEvaluator
Abstract evaluator for sibling index matching
final class IndexGreaterThan
Evaluator for matching by sibling index number (e {@literal >} idx)
final class IndexLessThan
Evaluator for matching by sibling index number (e {@literal <} idx)
final class IsEmpty
final class IsFirstChild
Evaluator for matching the first sibling (css :first-child)
final class IsFirstOfType
final class IsLastChild
Evaluator for matching the last sibling (css :last-child)
final class IsLastOfType
final class IsNthChild
css-compatible Evaluator for :eq (css :nth-child)
final class IsNthLastChild
css pseudo class :nth-last-child)
class IsNthLastOfType
class IsNthOfType
css pseudo class nth-of-type
final class IsOnlyChild
final class IsOnlyOfType
final class IsRoot
css3 pseudo-class :root
final class Matches
Evaluator for matching Element (and its descendants) text with regex
final class MatchesOwn
Evaluator for matching Element’s own text with regex
class Tag
Evaluator for tag name
final class TagEndsWith
Evaluator for tag name that ends with
override func matches(_ root: Element, _ node: Element) -> Bool
override func matches(_ root: Element, _ node: Element) -> Bool
override func matches(_ root: Element, _ element: Element) -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ node: Element) -> Bool
override func matches(_ root: Element, _ element: Element) -> Bool
override func matches(_ root: Element, _ element: Element) -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool
override func matches(_ root: Element, _ element: Element) throws -> Bool