I have a need to parse a nested IF statement to show it content from
open tag to closing tag.
For example, i want to be able to parse the following:
{ IF {MERGEFIELD Additional \####,###.00} = "0" "" "with additional amount of ${MERGEFIELD Additional \# ###,###.00}" }
IF MERGEFIELD Additional \# ###,###.00
Furthermore, I also need to know that the "MERGEFIELD Additional" was nested inside the "IF" field. So looking at the 1st paragraph in the example attached, I need to build the following structure:
Id Parent FieldText
==========================================================================================================================================================================
0 IF {MERGEFIELD Additional \####,###.00} = "0" "" "with additional amount of ${MERGEFIELD Additional \# ###,###.00}" }
1 0 {MERGEFIELD Additional \####,###.00}
2 0 {MERGEFIELD Additional \# ###,###.00}
I also need to work with other fields like SET (see 2nd paragraph in sample attached).