xts/src/main/java/org/jboss/as/xts/XTSSubsystemParser.java
@Override
    public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
        // no attributes
        if (reader.getAttributeCount() > 0) {
            throw ParseUtils.unexpectedAttribute(reader, 0);
        }

        final ModelNode subsystem = Util.getEmptyOperation(ADD, PathAddress.pathAddress(XTSExtension.SUBSYSTEM_PATH)
                .toModelNode());
        list.add(subsystem);

        final EnumSet<Element> encountered = EnumSet.noneOf(Element.class);
        final List<Element> expected = getExpectedElements(reader);

        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            final Element element = Element.forName(reader.getLocalName());

            if (!expected.contains(element) || !encountered.add(element)) {
                throw ParseUtils.unexpectedElement(reader);
            }

            switch (element) {
                case HOST: {
                    parseHostElement(reader, subsystem);
                    break;
                }
                case XTS_ENVIRONMENT: {
                    parseXTSEnvironmentElement(reader,subsystem);
                    break;
                }
                case DEFAULT_CONTEXT_PROPAGATION: {
                    parseDefaultContextPropagationElement(reader, subsystem);
                    break;
                }
                case ASYNC_REGISTRATION: {
                    parseAsyncRegistrationElement(reader, subsystem);
                    break;
                }
                default: {
                    throw ParseUtils.unexpectedElement(reader);
                }
            }
        }
    }
@Override
    public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
        // no attributes
        if (reader.getAttributeCount() > 0) {
            throw ParseUtils.unexpectedAttribute(reader, 0);
        }

        final ModelNode subsystem = Util.getEmptyOperation(ADD, PathAddress.pathAddress(XTSExtension.SUBSYSTEM_PATH)
                .toModelNode());
        list.add(subsystem);

        final EnumSet<Element> encountered = EnumSet.noneOf(Element.class);
        final List<Element> expected = getExpectedElements(reader);

        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            final Element element = Element.forName(reader.getLocalName());

            if (!expected.contains(element) || !encountered.add(element)) {
                throw ParseUtils.unexpectedElement(reader);
            }

            switch (element) {
                case HOST: {
                    parseHostElement(reader, subsystem);
                    break;
                }
                case XTS_ENVIRONMENT: {
                    parseXTSEnvironmentElement(reader,subsystem);
                    break;
                }
                case DEFAULT_CONTEXT_PROPAGATION: {
                    parseDefaultContextPropagationElement(reader, subsystem);
                    break;
                }
                case ASYNC_REGISTRATION: {
                    parseAsyncRegistrationElement(reader, subsystem);
                    break;
                }
                default: {
                    throw ParseUtils.unexpectedElement(reader);
                }
            }
        }
    }
@ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { // no attributes if ( reader . getAttributeCount ( ) > 0 ) { throw ParseUtils . unexpectedAttribute ( reader , 0 ) ; } final ModelNode subsystem = Util . getEmptyOperation ( ADD , PathAddress . pathAddress ( XTSExtension . SUBSYSTEM_PATH ) . toModelNode ( ) ) ; list . add ( subsystem ) ; final EnumSet < Element > encountered = EnumSet . noneOf ( Element . class ) ; final List < Element > expected = getExpectedElements ( reader ) ; while ( reader . hasNext ( ) && reader . nextTag ( ) != END_ELEMENT ) { final Element element = Element . forName ( reader . getLocalName ( ) ) ; if ( ! expected . contains ( element ) || ! encountered . add ( element ) ) { throw ParseUtils . unexpectedElement ( reader ) ; } switch ( element ) { case HOST : { parseHostElement ( reader , subsystem ) ; break ; } case XTS_ENVIRONMENT : { parseXTSEnvironmentElement ( reader , subsystem ) ; break ; } case DEFAULT_CONTEXT_PROPAGATION : { parseDefaultContextPropagationElement ( reader , subsystem ) ; break ; } case ASYNC_REGISTRATION : { parseAsyncRegistrationElement ( reader , subsystem ) ; break ; } default : { throw ParseUtils . unexpectedElement ( reader ) ; } } } }
{@inheritDoc}
{