On Wed, 2007-10-03 at 00:42 +0800, Steven Sim wrote: > Gurus; > > Sorry if this is not the proper forum. > > I've successfully written a Perl script to create a specific XML file. > > The problem comes when I attempt to run the script again and append XML > entries onto the XML file. > > Using XML::Writer, I am unable to perform a proper append. (The append > IO is successful but it breaks the XML syntax.)
Design problem more than a programming problem. Had similar issue with RSS feeds, simple approach was to append the XML segment onto the bottom of the file and then create a new 'working' file by simply concatenating the main file with the trailer: File 1 <head> <record value=1/> <record value=2/> File 2 </head> You can append <record value=3/> to file 1 and then concat File 1 and File 2 to create the actual final XML file. In our case creating the final static file in the web browser. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/