I have 4 similar nodes with 4 different values. For example, I have the below values.
<sample>
<a>123</a>
<a>45</a>
<a>67</a>
<a>890</a>
</sample>
I need to check the length of each node and if its less than 3, then leading zeroes should be appended like below.
<sample>
<a>123</a>
<a>045</a>
<a>067</a>
<a>890</a>
</sample>
After appending leading zeroes, I need to concatenate all the values together and pass it as a single string.
<a>123045067890</a>
Please provide an optimum solution.