text2xml: allow "-" in names and simplify code
text2xml: allow "-" in names and simplify code

kfractal/envytools,MoochMcGee/envytools,MoochMcGee/envytools,kfractal/envytools,MoochMcGee/envytools,grate-driver/envytools,grate-driver/envytools,kfractal/envytools,kfractal/envytools,karolherbst/envytools,envytools/envytools,pierremoreau/envytools,grate-driver/envytools,hakzsam/envytools,karolherbst/envytools,envytools/envytools,envytools/envytools,karolherbst/envytools,hakzsam/envytools,pierremoreau/envytools,hakzsam/envytools,grate-driver/envytools,grate-driver/envytools,envytools/envytools,hakzsam/envytools,kfractal/envytools,envytools/envytools,MoochMcGee/envytools,pierremoreau/envytools,karolherbst/envytools,karolherbst/envytools,hakzsam/envytools,pierremoreau/envytools,pierremoreau/envytools,MoochMcGee/envytools