When to Use an XmlDoc Object
You can use the XmlDoc class to access inbound messages. You can also use the XmlDoc class to create XML messages to be sent out, either synchronously or asynchronously.
All messages must be associated with a message definition. An XmlDoc message must be associated with an unstructured or nonrowset-based message, that is, a message definition that's created without any record definitions.
Use the XmlDoc object if any of the following is true:
Your message structure doesn’t fit the rowset model.
Your message data doesn’t come from database records.
Your third-party source or target node requires non-XML messages.
Your message uses the SOAP protocol.
Do not use the XmlDoc object if your message contains cookies.