private synchronized void updateContainerXML() throws IOException, ParserConfigurationException {
synchronized (_lock) {
    if (_containerEntry == null)     return;
  }
  if (m_ContainerFile != null && !m_ContainerFile.exists()) {
    m_ContainerFile.createNewFile();
    if (_logger.isLoggable(Level.FINE)) {
      _logger.fine("Created new " + m_ContainerFile + " XML file for "+ _containerName+ " container.");
    }
  }
  DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
  DocumentBuilder builder=factory.newDocumentBuilder();
  m_containerFileDocument=builder.newDocument();
  m_rootContainerElement=m_containerFileDocument.createElement(_containerName);
  m_rootSpaceElement=m_containerFileDocument.createElement(SPACE_TAG);
  m_rootContainerElement.appendChild(m_rootSpaceElement);
synchronized (_lock) {
    if (_containerEntry != null)     updateContainerXMLTree(_containerEntry.getName(),_containerEntry.getSpaceAttributes());
  }
  saveState();
}

private synchronized void updateContainerXML ( ) throws IOException , ParserConfigurationException { synchronized ( _lock ) { if ( _containerEntry == null ) return ; } if ( m_ContainerFile != null && ! m_ContainerFile . exists ( ) ) { m_ContainerFile . createNewFile ( ) ; if ( _logger . isLoggable ( Level . FINE ) ) { _logger . fine ( "Created new " + m_ContainerFile + " XML file for " + _containerName + " container." ) ; } } DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; m_containerFileDocument = builder . newDocument ( ) ; m_rootContainerElement = m_containerFileDocument . createElement ( _containerName ) ; m_rootSpaceElement = m_containerFileDocument . createElement ( SPACE_TAG ) ; m_rootContainerElement . appendChild ( m_rootSpaceElement ) ; synchronized ( _lock ) { if ( _containerEntry != null ) updateContainerXMLTree ( _containerEntry . getName ( ) , _containerEntry . getSpaceAttributes ( ) ) ; } saveState ( ) ; }
create ( if not exists ) and update the container xml , that will contain all present spaces and their relevant attributes .
