ElementTree addPreformatted(ElementTree parent, String initialtext=createString(0))
Arguments
parent: The parent elementinitialtext: Optionally, initial text content for the element.
Usage
Add a preformatted block to the end of the specified element. This is useful for displaying program code and other text where indentation may be significant or useful to preserve.
pre = addPreformatted(parent,"");
code = appendInlineElement(pre,"j = 0;
for i in [1..10] {
j += i;
}");