XML File Format

The information in ATS and RIS files that are in XML format is organized in specific XML tags.

The XML format uses an XML schema that is stored in the INFORMIXDIR/etc directory.

Data in XML files uses the UTF-8 encoding format.

Columns that appear empty could contain a null value or an empty string. The XML format differentiates between null data and empty strings by setting the isNull="true" attribute of the COLUMN tag for null data.

Data Types That are Not Shown

The values of the following data types are not shown in XML files:

  • Smart large objects
  • Simple large objects
  • User-defined data types

For these data types, the following attributes are set for the COLUMN tag:

  • isLOBorUDT="true"
  • dataExists="false"

Special Symbols

The following symbols are replaced if they exist in row data:

  • < is replaced by &lt;
  • > is replaced by &gt;
  • & is replaced by &amp;
  • " is replaced by &quot;
  • ' is replaced by &apos;

Example

The following example shows an ATS file displaying a transaction with two failed insert operations. The third column in each row contains a data type that is not shown.

<?xml version="1.0" encoding="UTF-8"?>
<ERFILE version="1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="/usr/informix/etc/idser.xsd">
  <ATS version="1">
    <TRANSACTION RISFile="/tmp/ris.g_cdr_ol_3.g_cdr_ol_2.D_5.080411_14.08.57.3.xml"  
                 generateRISFile="true" processedRows="2">
       <SOURCE id="20" name="g_cdr_ol_2" commitTime="2008-04-11T14:08:57"/>
       <TARGET id="30" name="g_cdr_ol_3" receiveTime="2008-04-11T14:08:57"/>
       <MESSAGE>All rows in a transaction defined with row scope were rejected</MESSAGE>
     </TRANSACTION>
     <ATSROWS>
       <ATSROW num="1" replicateID="655362" database="bank" owner="testadm" table="customer" 
              operation="Insert">
         <REPLICATED>
           <SHADOWCOLUMNS serverID="20" serverName="g_cdr_ol_2" cdrTimeInt="1207940937" 
                          cdrTimeString="2008-04-11T14:08:57"/>
           <DATA>
             <COLUMN name="col1" dataExists="true" isHex="false" isLOBorUDT="false" 
                     isNull="false">261</COLUMN>
             <COLUMN name="col2" dataExists="true" isHex="false" isLOBorUDT="false" 
                     isNull="false">cdr_ol_2</COLUMN>
             <COLUMN name="col3" dataExists="false" isHex="false" isLOBorUDT="true" 
                     isNull="false"></COLUMN>
           </DATA>									
         </REPLICATED>
       </ATSROW>
       <ATSROW num="2" replicateID="655362" database="bank" owner="testadm" table="customer"  
              operation="Insert">
         <REPLICATED>
           <SHADOWCOLUMNS serverID="20" serverName="g_cdr_ol_2" cdrTimeInt="1207940937" 
                          cdrTimeString="2008-04-11T14:08:57"/>
           <DATA>
             <COLUMN name="col1" dataExists="true" isHex="false" isLOBorUDT="false" 
                     isNull="false">262</COLUMN>
             <COLUMN name="col2" dataExists="true" isHex="false" isLOBorUDT="false" 
                     isNull="false">cdr_ol_2</COLUMN>
             <COLUMN name="col3" dataExists="false" isHex="false" isLOBorUDT="true" 
                     isNull="false"></COLUMN>
           </DATA>			
         </REPLICATED>
       </ATSROW>
     </ATSROWS>
   </ATS>
</ERFILE>

The following example shows the corresponding RIS file for the failed transaction shown in the ATS example.

<?xml version="1.0" encoding="UTF-8"?>
<ERFILE version="1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="/usr/informix/etc/idser.xsd">
  <RIS version="1">
     <SOURCE id="20" name="g_cdr_ol_2" commitTime="2008-04-11T14:08:57"/>
     <TARGET id="30" name="g_cdr_ol_3" receiveTime="2008-04-11T14:08:57"/>
     <RISROWS>
       <RISROW num="1" replicateID="655362" database="bank" owner="testadm" table="customer" 
              operation="Insert">
         <CDRERROR num="0"/>
         <SQLERROR num="-668"/>
         <ISAMERROR num="-1"/>
         <SPLCODE num="63"/>
         <LOCAL>
           <SHADOWCOLUMNS serverID="20" serverName="g_cdr_ol_2" cdrTimeInt="1206852121" 
                          cdrTimeString="2008-04-11T12:08:57"/>
           <DATA>
             <COLUMN name="col1" dataExists="true" isHex="false" isLOBorUDT="false" 
                     isNull="false">261</COLUMN>				
             <COLUMN name="col2" dataExists="true" isHex="false" isLOBorUDT="false" 
                     isNull="false">cdr_ol_2</COLUMN>			
             <COLUMN name="col3" dataExists="false" isHex="false" isLOBorUDT="true" 
                     isNull="false"></COLUMN>				
           </DATA>
         </LOCAL>
         <REPLICATED>
           <SHADOWCOLUMNS serverID="20" serverName="g_cdr_ol_2" cdrTimeInt="1207940937" 
                          cdrTimeString="2008-04-11T14:08:57"/>
           <DATA>
             <COLUMN name="col1" dataExists="true" isHex="false" isLOBorUDT="false" 
                     isNull="false">261</COLUMN>				
             <COLUMN name="col2" dataExists="true" isHex="false" isLOBorUDT="false" 
                     isNull="false">cdr_ol_2</COLUMN>			
             <COLUMN name="col3" dataExists="false" isHex="false" isLOBorUDT="true" 
                     isNull="false"></COLUMN>
          </DATA>									
        </REPLICATED>	
       </RISROW>
     </RISROWS>	
     <TXNABORTED ATSFile="/tmp/ats.g_cdr_ol_3.g_cdr_ol_2.D_5.080411_14.08.57.4.xml" 
                generateATSFile="true"/>
  </RIS>
</ERFILE>