I have a problem...
We are changing the structure of some DCTs (adding containers mainly), and merging some DataTypes.
In order to do this we need to modify the contents of existing DCRs to reflect the new structure.
e.g.1 We have added a container around a field within an OR replicant (because we have also added a TitleType field).
Old structure : dcr.Article.Title
New Structure : dcr.Article.
TitleContainer.Title
e.g.2 We have a DataType which is now obsolete,as everything in it can be done in a new, more flexible template. Therefore we need to convert the old into the new DCT's format
OLD : dcr.Body.Title
NEW : dcr.
Article.TitleContainer.Title
I am trying to write a Perl script in order to do this and I can read the DCR using TeamSite:

CRnode, and TeamSite:

CRparser (or XML:

OM), but I cannot figure out how to write it out (to a temp file) the new element structure.
Any and all help greatly appreciated.