in reply to Re^2: tagged text parser
in thread tagged text parser

I want to underscore what roboticus said. If you use XML it can be straightforward and robust. If not, it will likely be, at least sometimes, hellish and difficult to explain to customers why it breaks randomly. Part of the point of XML is that if it's not valid, it's not XML. It should be considered unacceptable garbage.

It is not difficult to write, read, parse, and validate against DTDs XML if you use something like XML::LibXML. If you don't intend to go that route, I would strongly recommend not using pretend XML. Use a different, real, format which is perhaps easier to sling like YAML, or JSON. So you know, I'm not trying to be critical. I'm trying to save you (and those who will inherit your code base) pain. Using a fake version of a real data format is like writing your own custom format from scratch except more confusing.