How to map tabular data

An example of mapping tabular data to XML file.

The component allows for mapping data that represents a table. An example of data containing tables may be provided by the RRTs generated by Professional Barcode component and representing barcode values for every page of a document.

  1. Consider a configuration with Professional Barcode as a process component and XML Generator component.
  2. In XML Generator configuration browse the following template.
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <Root>
    	<Document>
    		<Page>
    			<Number>Data</Number>
    			<FirstBarcode>Data</FirstBarcode>
    			<SecondBarcode>Data</SecondBarcode>
    		</Page>
    		<AllBarcodes>Data</AllBarcodes>
    	</Document>
    </Root>
    
                   
  3. Based on this template, set a configuration of the output file. First, multiply the Page node by inserting a counter m with Min value=1 and Max value=3.
  4. Next, replace the Number node value with m, the FirstBarcode node value with ~FRB::m,1~, the SecondBarcode node value with ~FRB::m,2~ and the AllBarcodes node value with ~FRB::*,*~.
If the original document has 3 pages, with the first page containing 2 barcodes, for example, code1, code2, the second page containing no barcodes, and the third page containing 2 barcodes, for example, code3, code4, then the output XML file for this document is as follows:
<?xml version="1.0" encoding="iso-8859-1" ?>
<Root>
	<Document>
		<Page>
			<Number>1</Number>
			<FirstBarcode>code1</FirstBarcode>
			<SecondBarcode>code2</SecondBarcode>
		</Page>
		<Page>
			<Number>2</Number>
			</FirstBarcode>
			</SecondBarcode>
		</Page>
		<Page>
			<Number>3</Number>
			<FirstBarcode>code3</FirstBarcode>
			<SecondBarcode>code4</SecondBarcode>
		</Page>
		<AllBarcodes>code1, code2, code3, code4</AllBarcodes>
	</Document>
</Root>