private void __adoptNode(__XElement e) { if (e.InternalValue.ownerDocument != this.InternalValue.ownerDocument) { var ownerDocument = this.InternalValue.ownerDocument; try { // IE does not implement adoptNode yet e.InternalValue = ownerDocument.importNode(e.InternalValue, true); } catch { } } }