
22 Sep
2004
22 Sep
'04
9:19 p.m.
John Torjo wrote:
Rob Stewart wrote:
Agreed, but pipes ("|") are easier to grok:
"<elem> | </elem><elem> | </elem>"
That's fine too.
This again runs into the problem of what if you want '|' in your format string? One possibility is to use non-printable characters, e.g. \xFF, but I don't think this would have widespread support. Implementing escaping for the above will complicate the evaluation of the format string as you cannot use str.find( "|" ). One possibility is to check if '\' exists before '|' after a find; if yes, repeat. Thus '\' becomes context-sensitive. This approach leads to "< |\\| >" for "< a\\b\\c >" formatting being ill-defined. Regards, Reece