Generating XML in Python -
i'm developing api using python makes server calls using xml. debating on whether use library (ex. http://wiki.python.org/moin/minidom) or if "better" (meaning less overhead , faster) use string concatenation in order generate xml used each request. also, xml generating going quite dynamic i'm not sure if allows me manage elements dynamically benefit.
i recommend make use of 1 of python libraries; such minidom, elementtree, lxml.etree or pyxser. there no reason not to, , potential performance impact minimal.
although, prefer using simplejson (or json) instead.
my_list = ["value1", "value2"] json = simplejson.dumps(my_list) # send json
Comments
Post a Comment