code: private WorkspaceEntry getWorkspaceEntry(InputStream wEntryStream, String repositoryName, String workspaceName)
              throws FileNotFoundException, JiBXException, RepositoryConfigurationException
     {
        RepositoryEntry rEntry = getRepositoryEntry(wEntryStream, repositoryName);
  
        WorkspaceEntry wsEntry = null;
  
        for (WorkspaceEntry wEntry : rEntry.getWorkspaceEntries())
           if (wEntry.getName().equals(workspaceName))
              wsEntry = wEntry;
  
        if (wsEntry == null)
        {
           throw new IllegalStateException("Can not find the workspace '" + workspaceName + "' in configuration.");
        }
  
        return wsEntry;
     }
docs: getWorkspaceEntry.
  
  @param wEntryStream
  InputStream, the workspace configuration
  @param workspaceName
  String, the workspace name
  @return WorkspaceEntry
  return the workspace entry
  @throws FileNotFoundException
  will be generated the FileNotFoundException
  @throws JiBXException
  will be generated the JiBXException
  @throws RepositoryConfigurationException
  will be generated the RepositoryConfigurationException