foreach cannot handle parentheses in block


The following construct with the #foreach statement gives the following error:

Error XMLPP100: Object reference not set to an instance of an object. Input File: input.sql
<!-- #ifdef _xml_preprocess --> <!-- #foreach(parameterList) insert TableName values (${parameterList}) --> <!-- #endif --> The error is caused by the parentheses. If I remove the parentheses, it works fine.
I'm using xmlpreprocess version v2.0.18.0 and am a happy user of this tool.


twinpiloot wrote Jul 7, 2015 at 8:57 AM

I just found a workaround for this issue.

Replace the parenthesis in the input file by ${LeftParenthesis} and ${RightParenthesis}.
Define these parameters in the settings file and voila, xmlpreprocess does the work for you!