in reply to Re: Buggy output from XML::Twig on a Tee
in thread Buggy output from XML::Twig on a Tee
yes the answer of Ikegami (using the twig_roots instead of the twig_handlers) produce a result as asked, in a single pass.
But it is not the solution that I will use because of some additional needs :p : in the 'common' part of the produced files, an identifier need to be different in each file, thus when parsing that identifier with XML::Twig, I cannot presume of the value to put in, because I do not know the number of final files.
It results in a complicated program where I need to keep the beginning of the file in memory to let it be updated differently each time I write a chunk of <thing> in a separate file, while not keeping all the <thing>'s in memory because of the quantity of data... I am tweaking an XML::SAX::Writer based solution instead.
|
|---|