{
    if (isInited) return (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);

    // Obtain or create and register package
    XMLTypePackageImpl theXMLTypePackage = (XMLTypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof XMLTypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new XMLTypePackageImpl());

    isInited = true;

    // Create package meta-data objects
    theXMLTypePackage.createPackageContents();

    // Initialize created meta-data
    theXMLTypePackage.initializePackageContents();

    // Register package validator
    EValidator.Registry.INSTANCE.put
      (theXMLTypePackage, 
       new EValidator.Descriptor()
       {
         public EValidator getEValidator()
         {
           return XMLTypeValidator.INSTANCE;
         }
       });

    // Mark meta-data to indicate it can't be changed
    theXMLTypePackage.freeze();

    return theXMLTypePackage;
  }