open file.xml ; for //text() { if xsh:matches(., '\S') echo concat(name(..), ':') (.) ; }