This is a VB.NET sample that shows how to get a Message Inbox from an existing XMLstring.
GetDataInterfaceFromXMLString (Visual Basic)
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oMessageService As MessagesService
Dim oMessageInbox As MessageHeaders
Dim sInboxXmlString As String
Dim oInboxFromString As MessageHeaders
Dim oMessageHeader As MessageHeader
'get company service
oCmpSrv = oCompany.GetCompanyService
'get msg service
oMessageService = oCmpSrv.GetBusinessService(ServiceTypes.MessagesService)
'retrieve the inbox as xml string
sInboxXmlString = oMessageInbox.ToXMLString
'create a new inbox data structure and fill it with the data from
'the xml string
oInboxFromString = oMessageService.GetDataInterfaceFromXMLString(sInboxXmlString)
'get first message header
oMessageHeader = oInboxFromString.Item(0)