Question
When creating an XML file based on input data, how can I avoid outputting empty tags for no infomation data?
Answer
By using [If Loop] logic in the iterative process, you can avoid outputting empty tags for no infomation data by not outputting the data itself.
-Processing Details
Mapper judges whether or not each element is empty and outputs data only when it is not empty.
The specific steps is as follows:
1. Judge whether or not the target element is an empty character
Judge if the target element is an empty character, using the [Single-line String Constant] logic with empty string set and the [Different] logic for the value of the target element.
2. Output only when the value is not an empty character using the [If Loop] logic
Set the judgment result of step 1 to [If Loop] logic and output only when the value of the target element does not match an empty character.
[Different]
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/StringNotEqual.htm
[Single-line String Constant]
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/SingleLineStringConstant.htm
[If Loop]
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/IfLoop.htm
Comments
0 comments
Article is closed for comments.