use minidom to parse from string and then write it to a file from xml.dom.minidom import parse, parseString
parseString(rawdata) On Mon, Oct 4, 2010 at 11:33 AM, Santosh Mohan <santosh....@gmail.com>wrote: > Hi, > > Need help in formatting xml document using xml.doc.minidom > > > I have a raw xml output, I need to format the xml output and write it to a > file. > > > rawdata=""" <head> <body> <name>Santosh</name> <age>29</age> > <place>Bangalore</place> </body> </head>""" > > I would appreciate your help. > > Thanks, > Santosh > > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- Nitin Pawar
-- http://mail.python.org/mailman/listinfo/python-list