Example 2: Get the AUI root node and save it to a file in XML format

MAIN
  DEFINE n om.DomNode 
  MENU "Test"
    COMMAND "SaveUI"
      LET n = ui.Interface.getRootNode()
      CALL n.writeXml("auitree.xml")
    COMMAND "Exit"
      EXIT MENU
  END MENU
END MAIN