XML - output in structured format and not single line

Is there any way to let the XML in Xojo write out the XML in structured file that is not just one line without indents ?

Thanks

Use XMLDocument.Transform (see its example).