private List<Field> parseMembers(final Node node) throws XPathExpressionException
    {
        final XPath xPath = XPathFactory.newInstance().newXPath();
        final NodeList list = (NodeList)xPath.compile(FIELD_OR_GROUP_OR_DATA_EXPR).evaluate(node, NODESET);
        boolean groupEncountered = false, dataEncountered = false;

        final ObjectHashSet<String> distinctNames = new ObjectHashSet<>();
        final IntHashSet distinctIds = new IntHashSet();
        final ArrayList<Field> fieldList = new ArrayList<>();

        for (int i = 0, size = list.getLength(); i < size; i++)
        {
            final Field field;
            final String nodeName = list.item(i).getNodeName();

            switch (nodeName)
            {
                case "group":
                    if (dataEncountered)
                    {
                        handleError(node, "group node specified after data node");
                    }

                    field = parseGroupField(list, i);
                    groupEncountered = true;
                    break;

                case "data":
                    field = parseDataField(list, i);
                    dataEncountered = true;
                    break;

                case "field":
                    if (groupEncountered || dataEncountered)
                    {
                        handleError(node, "field node specified after group or data node specified");
                    }

                    field = parseField(list, i);
                    break;

                default:
                    throw new IllegalStateException("Unknown node name: " + nodeName);
            }

            if (!distinctIds.add(field.id()))
            {
                handleError(node, "duplicate id found: " + field.id());
            }

            if (!distinctNames.add(field.name()))
            {
                handleError(node, "duplicate name found: " + field.name());
            }

            fieldList.add(field);
        }

        return fieldList;
    }
Return the encodedLength of the {@link Message} in bytes including any padding.

@return the encodedLength of the {@link Message} in bytes including any padding.
sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/Message.java