I must admit I hadn't the order->store() instruction, but unfortunately, after adding it (and clearing the cache) it doesn't get better, the order still is unchanged. I suppose the two $item-> instructions to be wrong...
I built in both of your suggestions, and I have now this code, which apparently does not raise any warnings or errors. The thing is that the setContent("[test]") now gets called but when I look at my data_text_1, it still contains the original XML + the two ## on each side...
This really drives me crazy! I spent the whole day on it, and it still doesn't work... Obviously the code changes the node content, but the final result doesn't reflect the change!