Blasta/blasta/helpers/xml.py
Schimon Jehudah, Adv. 77ac4c0ed9 Modularize code;
Update document README.
2024-11-13 16:41:33 +02:00

16 lines
453 B
Python

#!/usr/bin/python
# -*- coding: utf-8 -*-
class Xml:
def create_setting_entry(xmpp_instance, key : str, value : str):
form = xmpp_instance['xep_0004'].make_form('form', 'Settings')
form['type'] = 'result'
form.add_field(var=key,
value=value)
return form
# def create_setting_entry(value : str):
# element = ET.Element('value')
# element.text = value
# return element