On Wed, May 07, 2014 at 06:43:11PM +0530, jitendra gupta wrote: > Hi > > I just want to create a new xm file from existing xml file. so basically i > want to put contry details in countryName.xml from these file. > > I thought to do via read a line by line with normal file handling. but > there a problem with that. So i want to handle python XML . Could you > please suggest on this.
I'm afraid you need to explain in more detail what you want to do. Given the input quoted below: > <?xml version="1.0"?><data> > <country name="Liechtenstein"> > <rank updated="yes">2</rank> > <year>2008</year> > <gdppc>141100</gdppc> > <neighbor name="Austria" direction="E"/> > <neighbor name="Switzerland" direction="W"/> > </country> > <country name="Singapore"> > <rank updated="yes">5</rank> > <year>2011</year> > <gdppc>59900</gdppc> > <neighbor name="Malaysia" direction="N"/> > </country> what output are you expecting? -- Steven _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor