quandyfactory / dicttoxml

Simple library to convert a Python dictionary or other native data type into a valid XML string.
GNU General Public License v2.0
382 stars 147 forks source link

converting python dict to xml taking longer time and sometime hanged the system #80

Open sudhakar692 opened 4 years ago

sudhakar692 commented 4 years ago

while trying to write python object to XML it's taking a long time or some time even after 4-5 minutes, there is no response from the library.

quandyfactory commented 4 years ago

Can you share a code example that is causing this issue?

sudhakar692 commented 4 years ago

@quandyfactory Please find the code below

import dicttoxml

def writexml(data, custom_root_name =None):
    dicttoxml.LOG.setLevel(logging.ERROR)`
    dicttoxml.set_debug(False)
    xml_str = dicttoxml.dicttoxml(data, custom_root=custom_root_name)
    return xml_str

data is a valid python list.

quandyfactory commented 4 years ago

How big is the list?

sudhakar692 commented 4 years ago

it's quite big of size 26MB. if I export in CSV or JSON.

sudhakar692 commented 4 years ago

this link could be helpful to generate random data of desirable size https://www.json-generator.com/

sudhakar692 commented 4 years ago

@quandyfactory is there any thing you figured out?