changed text-serialization to use the generic data tree implementation