If it wasn't for the great and inteligent restriction that the whole XML has to be enclosed in one tag otherwise it's not legal XML, I'd say go ahead and use XML. I mean you might append the closing tag every time you write something and trim a few characters from the file whenever you need to append something, but that's tedious and error prone. So I guess ... use something that's not XML according to the purists and either append the closing tag (that's a term you are not supposed to use either) before you attempt to parse the file or split it into records before parsing the individual ones as if each was a separate XML.
I'd most likely use XML::Rules for reading and a combination of plain old print "<tag>$escaped_value</tag>"; and XML::Rules for output.
In reply to Re: Efficient log format
by Jenda
in thread Efficient log format
by jeepj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |