IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Check empty XML node Options · View
christophe.k
Posted: Sunday, March 29, 2020 9:19:00 PM
Rank: Newbie

Joined: 3/29/2020
Posts: 2
Location: Belgium
How can I check it a node exists and is not empty?

I tried the exists function and it works, but it does not work for nodes which occur more than once.

Imagine there are 2 details, the first detail has the node BatchNumber and the second detail has not.
If I use the exists function, it will always return true. How can I check that the BatchNumber in the second details exists?

In this case BatchNumber is a string, but in the case of ExpiryDate, we are talking about a date, so stirng functions are out of the question.

Thank you in advance.


christophe.k attached the following image(s):
2020-03-29 23_12_32-Altova MapForce.png

christophe.k
Posted: Monday, March 30, 2020 6:36:05 AM
Rank: Newbie

Joined: 3/29/2020
Posts: 2
Location: Belgium
Never mind, found the solution.
Apparently my mapping was wrong

Instead of adding the exists value on the parent node, I added an if-else to add the specific value


christophe.k attached the following image(s):
2020-03-30 08_36_12-Altova MapForce2.png
2020-03-30 08_36_26-Altova MapForce3.png

Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.