Next: The tag? matcher
Up: The standard matchers
Previous: The standard matchers
The tag matcher
The tag matcher matches a single tag.
tag name (attribute-matcher*) child-matcher* matcher
Arguments and Values:
name--One of three things:
- A regular expression that will match the name of the attribute. Note that ``^'' and ``$'' are added to the
start and end of the regular expression string.
- A cons of two regular expressions, both of which have ``^'' and ``$'' added as above, which match each element
of the (attribute-name . namespace) cons used by xmls to represent namespaces.
- A designator for a function. This is called on the attribute name (which may be a string or a
cons, as described above) and returns a boolean representing whether or not the function matches the attribute name.
attribute-matcher--matchers that will match attributes, like the attr matcher (see 3.5).
child-matcher--matchers that will match child nodes, like tags or character data.