Works really, really, really well for XML, and is in fact the only way anyone should ever try to generate XML.

\r\n\r\n

For document formats which don't slaughter all the firstborn children in your city because you forgot to encode an ampersand, Builder-style document generation is often more cumbersome than other solutions, and the time spent fixing any stray errors is often less than the time spent re-jiggering a bunch of document-builder classes when the boss tells you the navigation has to be on the other side, in reverse alphabetical order.

\r\n\r\n

For HTML to be used in production on the web:

\r\n\r\n
    \r\n
  • If you are Amazon, Google, Yahoo, Microsoft, eBay or a handful of other companies: not so bad, but still really cumbersome.
  • \r\n
  • If you are anyone else: blows great big steaming donkey balls. Having to develop the in-code document structures to represent the prototype for tomorrow's meeting, and not having the designer be able to even look at it until you've gotten it to compile and output the right structure will kill the average web shop. Having designers able to mock up the frontend in an HTML-ish language with little or no logic, while programmers build the backend to supply content bits, is really the only way such a shop can survive.
  • \r\n
\r\n\r\n

Let markup be markup. It was designed to be written by humans (or, at least, it was until XML came along and introduced the aforementioned child-slaughtering technique for error handling), and it's pretty good at that.