{
    ResourceSet resourceSet = createResourceSet();
    XMLResource resource = (XMLResource)resourceSet.createResource(XML_URI);
    if (options != null)
    {
      Map<Object, Object> mergedOptions = new HashMap<Object, Object>(loadOptions);
      mergedOptions.putAll(options);
      resource.load(node, mergedOptions);
    }
    else
    {
      resource.load(node, loadOptions);
    }
    resourceSet.getPackageRegistry().putAll(registry);
    return resource;
  }