Sybase CEP Engine can use XML Data Stream Format, which is compatible with the XML data format used by many third party applications.
The XML data stream consists of an infinite number of Tuple elements following one after another. There is no single root element in the stream. Each Tuple element must conform to the following schema:
<xs:schema xmlns="http://www.sybase.com/cpx/2004/03/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.sybase.com/cpx/2004/03/" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="Tuple"> <xs:complexType> <xs:sequence> <xs:element name="Field" maxOccurs="unbounded"> <xs:complexType> <xs:complexContent> <xs:extension base="xs:anyType"> <xs:attribute name="Name" type="xs:Name" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="Ts" type="xs:long" use="optional"/> </xs:complexType> </xs:element> </xs:schema>
The "Ts" attribute in the "Tuple" element contains the tuple's timestamp as a number of microseconds since 00:00:00 January 1, 1970.
For example, the XML trades stream can look as follows:
<Tuple Ts="11032230450" xmlns="http://www.sybase.com/cpx/2004/03/"> xmlns="http://www.sybase.com/cpx/2004/03/"> <Field Name="Timestamp">2005/01/28 10:23:54</Field> <Field Name="Symbol">ABC</Field> <Field Name="Price">11.40</Field> <Field Name="Volume">300000</Field> </Tuple> <Tuple Ts="11032230454" xmlns="http://www.sybase.com/cpx/2004/03/"> <Field Name="Timestamp"> 2005/01/28 10:23:55</Field> <Field Name="Symbol">XYZ</Field> <Field Name="Price">32.84</Field> <Field Name="Volume">1260000</Field> </Tuple> <Tuple Ts="11032230464" xmlns="http://www.sybase.com/cpx/2004/03/"> <Field Name="Timestamp"> 2005/01/28 10:24:06</Field> <Field Name="Symbol">XYZ</Field> <Field Name="Price">32.74</Field> <Field Name="Volume">6300000</Field> </Tuple> <Tuple Ts="11032230467" xmlns="http://www.sybase.com/cpx/2004/03/"> <Field Name="Timestamp">2005/01/28 10:24:32</Field> <Field Name="Symbol">ABC</Field> <Field Name="Price">12.01</Field> <Field Name="Volume">50000</Field> </Tuple> ...
The XML Data Stream format has no options.