/**
   * A method to request a list of DOM implementations that support the specified features and
   * versions, as specified in .
   *
   * @param features A string that specifies which features and versions are required. This is a
   *     space separated list in which each feature is specified by its name optionally followed by
   *     a space and a version number. This is something like: "XML 3.0 Traversal +Events 2.0"
   * @return A list of DOM implementations that support the desired features.
   */
  public DOMImplementationList getDOMImplementationList(String features) {
    // first check whether the CoreDOMImplementation would do
    DOMImplementation impl = CoreDOMImplementationImpl.getDOMImplementation();
    final ArrayList implementations = new ArrayList();
    if (testImpl(impl, features)) {
      implementations.add(impl);
    }
    impl = DOMImplementationImpl.getDOMImplementation();
    if (testImpl(impl, features)) {
      implementations.add(impl);
    }

    return new DOMImplementationListImpl(implementations);
  }
  /**
   * A method to request a DOM implementation.
   *
   * @param features A string that specifies which features are required. This is a space separated
   *     list in which each feature is specified by its name optionally followed by a space and a
   *     version number. This is something like: "XML 1.0 Traversal Events 2.0"
   * @return An implementation that has the desired features, or <code>null</code> if this source
   *     has none.
   */
  public DOMImplementation getDOMImplementation(String features) {
    // first check whether the CoreDOMImplementation would do
    DOMImplementation impl = CoreDOMImplementationImpl.getDOMImplementation();
    if (testImpl(impl, features)) {
      return impl;
    }
    // if not try the DOMImplementation
    impl = DOMImplementationImpl.getDOMImplementation();
    if (testImpl(impl, features)) {
      return impl;
    }

    return null;
  }