This discussion is archived
1 Reply Latest reply: Jun 24, 2012 4:38 PM by 818119 RSS

Skipping nodes where data does not exist

818119 Newbie
Currently Being Moderated
Is there a way to 'boycot' or a way to 'suppress write' if a node does not contain any children in an XML file?

I've created my RTF template with the 'for-each' populating all the necessary fields, but there are some sections that don't contain data and are consequently producing blank rows in my table. For instance:

+<On_Sequence_Number_S11>+
<Corporate_S1>
*<Print_Sections_S4/>*
</Corporate_S1>
+</On_Sequence_Number_S11>+

+<On_Sequence_Number_S11>+
<Corporate_S1>
*<Print_Sections_S4>*
<PageHeaderNumber>1</PageHeaderNumber>
<TtlFcastMnth_ID6>12500</TtlFcastMnth_ID6>
<Contract_Name_and_number_ID54>123456 Joint Venture - Development Rec</Contract_Name_and_number_ID54>
<Display_ID56>JV</Display_ID56>
*</Print_Sections_S4>*
</Corporate_S1>
+</On_Sequence_Number_S11>+

I currently have the following 'for-each' loops setup in the table within my RTF template:

+<?for-each:On_Sequence_Number_S11?>+
*<?for-each:Print_Sections_S4?>*
<?TtlFcastMnth_ID6?>
<?Contract_Name_and_number_ID54?>
*<?end for-each?>*
<?Total_Contract_Forecast_ID2?>
+<?end for-each?>+

I want to be able to skip over the nodes that don't have any data under *<Print_Sections_S4>*. Is there some simple method that I've overlooked?

Edited by: 815116 on Nov 24, 2010 2:37 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points