This document shows some samples of how the XML COM library can be used to create and send custom XML tags when using the JabberCOM DLL.
The examples are currently in Delphi syntax, since that's the easiest thing for me right now :) Other usage samples will be forth-coming.
// Create a new tag and send it to the server. // Note that an existing JabberSession must // already be created. These examples assume that // this object is called 'Jabber' procedure SendCustomIQ; var NewXMLTag: IXMLTag; begin NewXMLTag := JabberSession.CreateXML; // this could also be something like NewXMLTag := CreateOLEObject('JabberCOM.XMLTag) // Now construct the XML Tag with NewXMLTag do begin Name := 'iq'; PutAttrib('type', 'set'); with AddTag('query') do begin PutAttrib('namespace', 'jabber:iq:vcard'); AddBasicTag('first', 'John'); AddBasicTag('last', 'Smith'); end; end; // Send the resulting raw xml text to // the server using the IJabberSession Object Jabber.SendXML(NewXMLTag.xml); end;