Converts a data object or array into an XML formatted string.
Turns a piece of structured data, such as an object or a list, into a single XML text string. Use this when a system you send data to expects an XML document rather than separate fields. Each field becomes an element, and the whole message is wrapped in one outer element whose name you can choose.