first-child-tag ( tag -- child ) (original) (raw)
first-child-tag ( tag -- child )
Utilities for traversing XML
Prev: | children-tags ( tag -- sequence ) |
---|---|
Next: | assert-tag ( name name -- ) |
Inputs
tag | an XML tag or document |
---|
Outputs
child | a tag |
---|
Word description
Returns the first child of the given tag that is a tag.
See also
children-tags
Definition
USING: accessors kernel sequences xml.data ;
: first-child-tag ( tag -- child )
children>> [ tag? ] find nip ;