Hello Team,
I would like create a template with dynamic table based on the XML data. My scenario, I have an XML which holds dynamic table data that means the number of columns may differ for each case. I would like to create a generic template to create a table based on the XML data (Actual XML is attached). The attached XML contains the data from two tables (1. results table 2. RequestTest)
The structure of XML is as follows (Actual XML is attached)
MetaData node: It will hold the field names to display (like column headers)
<meta_data Table=“results” Field=“f_AeratedBulkDensitylbsft3” Label=“Aerated Bulk Density (lbs/ft3” />
Here,
Table -> Holds the reference node to check under Data node.
Field -> Mapping field name in the result node
Label -> Display value of field in the report. If not provided, field value should display in the report
Data node: It will hold the corresponding values/results for the fileds
Here,
results -> is the reference row defined in the meta data
f_AeratedBulkDensitylbsft3,f_PackedBulkDensitylbsft3, f_AeratedBulkDensitySG etc -> Mapping fields with values
Request you to help me on how to create a generic template for this scenario. The XML file and expected output report file (doc) is attached. Sample files.zip (33.1 KB)