other file does not contain root element.
Well obviously, without a root element it is not an XML document and you cant parse it into a DOM.
SO - why not just treat this as a text file merging problem? How tricky is it to find the point at which the new text should be inserted?
IF you absolutely have to have the second as a DOM, add Strings for the root element opening and closing tags to the existing text.
Bill