tag-named-with-attr ( tag tag-name attr-value attr-name -- matching-tag )


Vocabulary
xml.traversal

Inputs
tagan XML tag or document
tag-namean XML name or string representing the name
attr-valuea string representing the attribute value
attr-namea string representing the attribute name


Outputs
matching-taga tag


Word description
Finds the first tag with matching name with the corresponding attribute name and value which is the direct child of the given tag.

See also
tag-named

Definition


: tag-named-with-attr
( tag tag-name attr-value attr-name -- matching-tag )
[ tags-named ] 2dip [ tag-with-attr? ] 2curry find nip ;