@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (localName.equals(ROOT_ELEMENT_NAME) && ("".equals(uri) || JAVAEE_URIS.contains(uri))) { processRootElement(attributes); return; } if (currentContainer == null) { Container container = getContainer(uri, localName); if (container != null) { if (seenContainers.contains(container)) { container.handleMultiple(); } currentContainer = container; } } else { currentContainer.processStartChildElement(uri, localName, qName, attributes); // The current container is interested in the content of this element if (currentContainer.getNestedElements().contains(localName)) { buffer = new StringBuilder(); } } }