1 ' Simple VisualBasic HelloWorld example how to access xmlBlaster
 2 ' We connect to xmlBlaster and query the free memory of the server
 3 ' @author Marcel Ruff
 4 Module HelloWorld
 5     Sub Main()
 6         Dim request, response As String
 7         Dim xmlBlaster As XmlScriptAccess.XmlScriptAccessClass
 8 
 9         xmlBlaster = New XmlScriptAccess.XmlScriptAccessClass
10 
11         ' Configure using the SOCKET protocol
12         Dim argArr(1) As String
13         argArr(0) = "-protocol"
14         argArr(1) = "SOCKET"
15         xmlBlaster.initArgs(argArr)
16 
17         ' Connect to the server
18         response = xmlBlaster.sendRequest("<xmlBlaster><connect/></xmlBlaster>")
19 
20         ' Query the free memory
21         request = "<xmlBlaster><get><key oid='__cmd:?freeMem'/></get></xmlBlaster>"
22         response = xmlBlaster.sendRequest(request)
23         Console.WriteLine("Got response:" & response)
24 
25         ' Leave the server
26         response = xmlBlaster.sendRequest("<xmlBlaster><disconnect/></xmlBlaster>")
27     End Sub
28 End Module


syntax highlighted by Code2HTML, v. 0.9.1