ConvertNodesValueToXml Infinite Loop
Posted: August 18th, 2022, 4:55 pm
Given a CreateServiceNode service like below:
Converting the same node to XML but with ParentNodePath = "WorkData/TestValues/Output/Result/Status" seems to infinite loop as it switches between the 2 "Status" nodes.
Testing with ParentNodePath = "WorkData/TestValues/Output/Result/Status[not(*)]" seems to corroborate this as it actually finishes and results in:
Note: ParentNodePath = "WorkData/TestValues/Output/Result/Test" does not infinitely loop, likely due to there being only 1 "Test" node.
Summary Given the above service and ConvertNodesValueToXml with ParentNodePath equal to:
Converting to XML with ParentNodePath = "WorkData/TestValues/Output/Result/Status[1]" results in:
This suggests that the first "Status" node was removed, converted, and appended back at the end.Converting the same node to XML but with ParentNodePath = "WorkData/TestValues/Output/Result/Status" seems to infinite loop as it switches between the 2 "Status" nodes.
Testing with ParentNodePath = "WorkData/TestValues/Output/Result/Status[not(*)]" seems to corroborate this as it actually finishes and results in:
Note: ParentNodePath = "WorkData/TestValues/Output/Result/Test" does not infinitely loop, likely due to there being only 1 "Test" node.
Summary Given the above service and ConvertNodesValueToXml with ParentNodePath equal to:
- WorkData/TestValues/Output/Result/Status[1]
- Converts 1 "Status" node and moves it to the end
- WorkData/TestValues/Output/Result/Status
- Infinite loops
- WorkData/TestValues/Output/Result/Status[not(*)]
- Works as only nodes with no children already are converted
- WorkData/TestValues/Output/Result/Test
- Works presumable because only one "Test" node exists