on 04-29-2008 12:09 PM
hello experts
I have an XML that some time will have an element under the root, and some time not.
for example:
<Asset>
<PolicyPlan />
</Asset>
or if there is an element with data
<Asset>
<PolicyPlan >
<ID="1">
</PolicyPlan >
</Asset>
I would like to know if I can in the XI to check if there is an element under PolicyPlan, and if so, return its value (in this case 1) and if not return an empty string.
if it can be done in XI, or there is a code that need to be written as a new function, help will be appreciated.
Thanks
Kfir
Hi,
I hope you can achieve this with "exists" node function.
Experts, correct me If I am wrong.
Regards
Bhanu
Intelligroup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please try to do the following mapping.
Map the source to exist function, The output of exist has to send to if conditiond and the output of if condition to the target.
Thanks,
Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In mapping you can use the function
mapWithDefault.
This returns the original value if available, otherwise the default value, for example an empty string.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.