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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -