copy/paste with awk

Hi everybody,

I have two XML files.
I am working on a script that could copy and paste the contents of the first xml file to the desired location in the second xml file.

Here is my first XML file.

This is the second XML file.

Finaly, I wnat to obtain something like that :

I think it is possible with awk but another solution will do it too.

Thanks, Ludo

sed '/<\/DeviceName>/r first.xml' second.xml

Thank you very much, it solved my problem !