Hi John, > but when I open the newly created file I didn't get the expected (sorted) > output !!
Pity. Could you please indicate what output you would expect? I am getting (and expecting) this result: <A>A</A><A>Ab</A><A>An</A><A>D</A><A>P</A> Best, Christian