@Override
  public void endElement(String uri, String localName, String qName) throws SAXException {
    switch (localName) {
      case ELEMENT_CACHE: {
        MockCacheExtension extension = (MockCacheExtension) stack.pop();
        CacheCreation cache = (CacheCreation) stack.peek();
        cache.getExtensionPoint().addExtension(extension);
        break;
      }
      case ELEMENT_REGION: {
        MockRegionExtension extension = (MockRegionExtension) stack.pop();
        RegionCreation region = (RegionCreation) stack.peek();
        region.getExtensionPoint().addExtension(extension);
        break;
      }
      default:
        throw new SAXParseException("Unexpected element '" + localName + "'.", documentLocator);
    }
  }
Mock Extension {@link XmlParser}.


@since GemFire 8.1
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/extension/mock/MockExtensionXmlParser.java