I am using xmlNodeToDocument. The output document structure is:
/root/doc1/doc2/doc3
doc2 is actually a DocumentList. However, Doc2 rarely contains more than 1 element. I need to process all of the doc3 that can exist in this structure. In my code, I loop over /root/doc1/doc2.
Here’s the issue:
When doc2 contains only 1 instance, the code in my loop is never executed. When doc2 contains more than 1 instance, the code in my loop is exectured.
How do I make sure the code in my loop will ALWAYS be executed?