I have a complex structure which contains a list ofthe following form
complex tree here
...
<ns3:timestampList xmlns="myNameSpace">
<timestampInfo>
<timestampID>START</timestampID>
<timestamp>2012-02-25T00:30:18.705+01:00</timestamp>
</timestampInfo>
<timestampInfo>
<timestampID>END</timestampID>
<timestamp>2012-02-25T00:30:23.675+01:00</timestamp>
</timestampInfo>
<timestampInfo>
<timestampID>RE_START</timestampID>
<timestamp>2012-02-25T00:30:18.705+01:00</timestamp>
</timestampInfo>
</ns3:timestampList>
I would like to retain the whole try and only add a new timestampinfo block.
I know that I could traverse the tree and add to the output all the nodes using copy-of but I wonder if there is no better and elegant way to do this.
might suffice to give you an idea although with different namespaces used but not completely given in your sample my code is also not complete.