For another question I have created some XML related code that works on my development machine but not on viper codepad where I tested it before adding it to my answer.
It looks like an bug in 20626 version:
It process first all child text nodes in document order, then content of child element nodes. Should be as result on your machine