tag-named ( tag name/string -- matching-tag ) (original) (raw)
tag-named ( tag name/string -- matching-tag )
Utilities for traversing XML
Prev: | An example of XML processing |
---|---|
Next: | tags-named ( tag name/string -- tags-seq ) |
Inputs
tag | an XML tag or document |
---|---|
name/string | an XML name or string representing the name |
Outputs
matching-tag | a tag |
---|
Word description
Finds the first tag with matching name which is the direct child of the given tag.
See also
deep-tags-named, deep-tag-named, tag-named-with-attr, tags-named
Definition
USING: kernel sequences xml.data ;
: tag-named ( tag name/string -- matching-tag )
assure-name [ swap tag-named? ] curry find nip ;