# toPubSubXML method

XMLNode toPubSubXML()

## Implementation

    XMLNode toPubSubXML() {
      final suggestsElements = suggests.keys.map((suggest) {
        Map<String, String> attrs;
        if (suggest.isEmpty) {
          attrs = {};
        } else {
          attrs = {
            'xml:lang': suggest,
          };
        }

        return XMLNode(
          tag: 'suggest',
          attributes: attrs,
          text: suggests[suggest],
        );
      });

      return XMLNode(
        tag: 'item',
        children: [
          metadata.toXML(),
          ...sources.map((source) => source.toXml()),
          ...suggestsElements,
        ],
      );
    }