Is there any way to copy (deep) element from one DOMDocument instance to another?
<Document1>
<items>
<item>1</item>
<item>2</item>
...
</items>
</Document1>
<Document2>
<items>
</items>
</Document>
I need to copy /Document1/items/* to /Document2/items/.
It seems that DOMDocument doesn't have methods to import nodes from another DOMDocument. It even can't create nodes from xml text.
Of course I can achieve this using string operations, but maybe there is simpler solution?