code: public boolean removeDatastore(final String datastoreName) {
          final Element datastoreCatalogElement = getDatastoreCatalogElement();
          final NodeList childNodes = datastoreCatalogElement.getChildNodes();
          final int length = childNodes.getLength();
          for (int i = 0; i < length; i++) {
              final Node node = childNodes.item(i);
              if (node instanceof Element) {
                  final Element element = (Element) node;
                  final Attr[] attributes = XmlDomDataContext.getAttributes(element);
                  for (Attr attr : attributes) {
                      if ("name".equals(attr.getName())) {
                          final String value = attr.getValue();
                          if (datastoreName.equals(value)) {
                              // we have a match
                              datastoreCatalogElement.removeChild(element);
                              
                              onDocumentChanged(getDocument());
                              
                              return true;
                          }
                      }
                  }
              }
          }
  
          return false;
      }
docs: Removes a datastore by it's name, if it exists and is recognizeable by
  the externalizer.
  
  @param datastoreName
  @return true if a datastore element was removed from the XML document.