Node importedNode =
doc.importNode( insertDoc.getDocumentElement(), true );
context.setLenient( true );
context.setFactory( new DOMFactory() );
context.createPathAndSetValue( this.xPath, importedNode );
} else {
// Otherwise just try to put a the input document in
// the place pointed to by the xpath
context.setValue( this.xPath, insertDoc );