Vocabulary
xml.traversal

Inputs
tagan XML tag or document


Outputs
stringa string


Word description
Concatenates the children of the tag, throwing an exception when there is a non-string child.

Definition


: children>string ( tag -- string )
children>> {
{ [ dup empty? ] [ drop "" ] }
{
[ dup [ string? not ] any? ]
[
"XML tag unexpectedly contains non-text children"
throw
]
}
[ concat ]
} cond ;