private Field parseDataField(final NodeList nodeList, final int nodeIndex)
    {
        final Node node = nodeList.item(nodeIndex);
        final String typeName = getAttributeValue(node, "type");
        final Type fieldType = typeByNameMap.get(typeName);
        if (fieldType == null)
        {
            handleError(node, "could not find type: " + typeName);
        }
        else if (!(fieldType instanceof CompositeType))
        {
            handleError(node, "data type is not composite type: " + typeName);
        }
        else
        {
            ((CompositeType)fieldType).checkForWellFormedVariableLengthDataEncoding(node);
            ((CompositeType)fieldType).makeDataFieldCompositeType();
        }

        final Field field = new Field.Builder()
            .name(getAttributeValue(node, "name"))
            .description(getAttributeValueOrNull(node, "description"))
            .id(Integer.parseInt(getAttributeValue(node, "id")))
            .offset(Integer.parseInt(getAttributeValue(node, "offset", "0")))
            .semanticType(getAttributeValueOrNull(node, "semanticType"))
            .presence(Presence.get(getAttributeValue(node, "presence", "required")))
            .sinceVersion(Integer.parseInt(getAttributeValue(node, "sinceVersion", "0")))
            .deprecated(Integer.parseInt(getAttributeValue(node, "deprecated", "0")))
            .epoch(getAttributeValueOrNull(node, "epoch"))
            .timeUnit(getAttributeValueOrNull(node, "timeUnit"))
            .type(fieldType)
            .variableLength(true)
            .build();

        field.validate(node, typeByNameMap);

        return field;
    }
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