There is not specific formatting option for xmlelements. You can use the NoFormat Start/End comment directives to preserve your manual formatting:

Code
-- NoFormat Start
select xmlelement("xmlelement("XML1",
               xmlagg(
                 xmlelement("XML2", ....
-- NoFormat End


Marco Kalter
Allround Automations