I have an small xml but with a single tag with text as long as 3 pages, I need to now is there a way to format this text inside the extraction variable of the tag, like Line CR:LF bold, paragraph, format spaces and tables, all the tag is variable and is text of a contract.
Not sure how you want to format the content of the tag but i have created the attached example which demonstrates how you could approach this task. In the data mapper, I’m splitting the text on the LF (\n). Once I have this array of lines,
var tc = data.extract('./evc_spc_endoso_emision7[1]/txt_anexo[1]').split('\n');
var numLines = tc.length;
I can now use the technique described here to extract each line as a separate record in a detail table.
In the Extraction within the Repeat loop, I can then test for the line I am on; i.e whether it’s a header, subheader or simply a paragraph. In this example, I have formatted the headers and subheaders with the following script:
Now in the Designer, it’s just a matter of inserting a detail table. Then select the field @t2@, right-click and click on Text…Format the whitespace attribute with the pre-wrap value so that the formatting of the text is maintained while automatically adding line breaks.