XML Generation Reference
The generate XML command converts an XML Document or XML Element class into XML text. The resulting XML data may be returned to AppleScript for further processing or it may be written to a file. XML characters (‘<‘ and ‘&’) are automatically escaped as part of the XML generation process.
Generate XML Syntax