# toXml method

XMLNode toXml()

## Implementation

    XMLNode toXml() {
      return DataForm(
        type: 'submit',
        instructions: [],
        reported: [],
        items: [],
        fields: [
          const DataFormField(
            options: [],
            isRequired: false,
            values: [pubsubPublishOptionsXmlns],
            varAttr: 'FORM_TYPE',
            type: 'hidden',
          ),
          if (accessModel != null)
            DataFormField(
              options: [],
              isRequired: false,
              values: [accessModel!],
              varAttr: 'pubsub#access_model',
            ),
          if (maxItems != null)
            DataFormField(
              options: [],
              isRequired: false,
              values: [maxItems!],
              varAttr: 'pubsub#max_items',
            ),
        ],
      ).toXml();
    }