Sunday 14 January 2024

Avoid/Ignore if we have empty tag in XML.

 Ignore the Empty Tag in XML or avoid blank rows in For loop BIP Report.


If we have blank row of data in For Loop in BIP Reports like in below example:

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
  <Basket>
    <Fruit>
        <Type>Apple</Type>
        <Number>2</Number>
    </Fruit>
    <Fruit />
    <Fruit>
        <Type>Orange</Type>
        <Number>5</Number>
    </Fruit>
</Basket>


If you look second occurrence the tag <Fruit> is empty.

Now if we create BIP Report that will loop through each Fruit.





BI Report will look like this because second occurrence is empty. 









We have to tweak RTF template design to solve this issue and then write the for loop accordingly.





use the for loop shown in above example to solve the issue.

BIP Report looks like 











No comments:

Post a Comment

Avoid/Ignore if we have empty tag in XML.

 Ignore the Empty Tag in XML or avoid blank rows in For loop BIP Report. If we have blank row of data in For Loop in BIP Reports like in bel...