If you can sacrifice your requirement to append to an existing file, than XML::Simple can do it. Might be even saver to work with two files
for smaller sets of data (XMLin file / modify data in memory / XMLout new file)?
so if i got it right, you are suggesting that i copy contents from an existing file, and push it into a new file(new by name of just replacing the old one) along with the additional data i am pushing in this time. :)
sure XML::SIMPLE would do that, but there's ought to be a simpler way. right?
It depends... Do you mean simple in the sense of performance? Well, who says that your existing XML file has to be treated as such (parsed and validated)? Seek to the end of the file, before the </a>, add another <b>...</b></a> sequence and done. But I guess, you want a little bit more than that...and a little bit more robustness?
The previous suggestion is simple to program, but surely not the fastest way to append a node to a (potentially large) file.