$ #create an array of tags and show all samples of the stamp
$ cat a21.txt | perl -e '@a=<>; $"=""; $_="@a"; s/[\r\n]//g; @a=split/>/; foreach $_ (@a){if(/\n/; print;}}'
$ #retrieve the attributes
$ cat a21.txt | perl -e '@a=<>; $"=""; $_="@a"; s/[\r\n]//g; s/ ([a-z]+)=/ [$1]=/g; @a=split/\]/; foreach $_ (@a){if(/\[/) {s/^.*\[//; s/$/\n/; print;}}' | sort | uniq
from
on
to
what
why
$ #retrieve the stamps
$ cat a21.txt | perl -e '@a=<>; $"=""; $_="@a"; s/[\r\n]//g; @a=split/>/; foreach $_ (@a){if(/<[a-z]/) {/^.*<([a-z]+)/; $_=$1."\n"; print; }}' | sort | uniq
abuse
class
contract
found
identity
learn
limit
lost
remark
return
ship
supply
tariff
undue
until