Contents
This sample demonstrates the usage of the embedded XMLFileWriter adapter.
In StreamBase Studio, import this sample with the following steps:
-
From the top menu, click → .
-
Select this sample from the Embedded Adapters list.
-
Click OK.
StreamBase Studio creates a single project containing the sample files.
By default, the sample files are installed in:
- On Windows
-
C:\Program Files\StreamBase Systems\StreamBase.n.m\sample\adapter\embedded\xmlfilewriter\ - On UNIX
-
/opt/streambase/sample/adapter/embedded/xmlfilewriter/
-
Open the
XMLFileWriterTest.sbappsample. -
In the EventFlow editor click the XMLFileWriter adapter icon to open its Properties view.
-
In the Adapter Settings tab, change File Name to point to a location on your machine where you want the log to be written when the application is run.
-
Make sure the application is the currently active tab in the EventFlow Editor.
Click the
Run StreamBase Application (Default Launch) button.
(Not the Run button.) This opens the
Test/Debug perspective and starts the application.
-
Select the Manual Input tab.
-
Enter a valid integer for a and press .
-
Click → .
-
The file specified in File Name should now contain tuples formatted as follows:
<tuple>
<a>2</a>
</tuple>
-
Change the current working directory to where the sample is installed.
-
Run
sbd XMLFileWriterTest.sbapp. -
In another window, run
sbc enqueue InputStream1 < inputstream.dat. -
Run
sbadmin shutdownto exit sbd. -
The file specified in File Name should now contain a log of tuples.
