Among the hardest things to get right in designing any text file
format are issues of quoting, whitespace and other low-level syntax
details. Custom file formats often suffer from slightly broken syntax
that doesn't quite match other similar formats. Using a standard format
such as XML, which is verifiable and parsed by a standard library,
eliminates most of these issues.
One interesting bridge between these worlds is PYX format
— a line-oriented translation of XML that can be hacked with
traditional line-oriented Unix text tools and then losslessly
translated back to XML. A Web search for “Pyxie” will
turn up resources. The xmltk toolkit takes the opposite tack,
providing stream-oriented tools analogous to
grep(1)
and
sort(1)
for filtering XML documents; Web search for
“xmltk” to find it.
XML can be a simplifying choice or a complicating one. There is
a lot of hype surrounding it, but don't become a fashion victim by either
adopting or rejecting it uncritically. Choose carefully and bear the KISS
principle in mind.
[an error occurred while processing this directive]