code: public void importXML(String parentAbsPath, InputStream in, int uuidBehavior, Map<String, Object> context)
        throws IOException, PathNotFoundException, ItemExistsException, ConstraintViolationException,
        InvalidSerializedDataException, RepositoryException
     {
        checkLive();
        NodeImpl node = (NodeImpl)getItem(parentAbsPath);
        if (!node.checkedOut())
        {
           throw new VersionException("Node " + node.getPath() + " or its nearest ancestor is checked-in");
        }
  
        // Check if node is not protected
        if (node.getDefinition().isProtected())
        {
           throw new ConstraintViolationException("Can't add protected node " + node.getName() + " to "
              + node.getParent().getPath());
        }
  
        // Check locking
        if (!node.checkLocking())
        {
           throw new LockException("Node " + node.getPath() + " is locked ");
        }
  
        StreamImporter importer =
           new ExportImportFactory().getStreamImporter(((NodeData)node.getData()), uuidBehavior,
              new ItemDataKeeperAdapter(getTransientNodesManager()), getTransientNodesManager(), nodeTypeManager,
              getLocationFactory(), getValueFactory(), getWorkspace().getNamespaceRegistry(), getAccessManager(),
              userState, context, (RepositoryImpl)getRepository(), getWorkspace().getName());
        importer.importStream(in);
     }
docs: {@inheritDoc}