An interface used by objects, such as Tapestry components, that need to render themselves as some form of XML markup.
A markup writer maintains the idea of a current element. Attributes are added to the current element, and new text
and elements are placed inside the current element. In this way, the markup writer maintains a facade that XML markup
is generated as a stream, even though the implementation builds a kind of DOM tree. The DOM tree can be also be
manipulated. This solves a number of problems from Tapestry 4 (and earlier) where random access to the DOM was
desired and had to be simulated through complex buffering.
Begins a new element as a child of the current element. The new element becomes the current element. The new
Element is returned and can be directly manipulated (possibly at a later date). Optionally, attributes for the
new element can be specified directly.
name - the name of the element to create
attributes - an even number of values, alternating names and values
Writes raw text, text with existing markup that should be passed through the client without change. This
can be useful when the markup is read from an external source (a file or a database) and is simply to be
Adds an XML comment. The text should be just the comment content, the comment delimiters will be provided.
Note that, as of Tapestry 5.2., no extra whitespace is added (previous releases added a space around the text).