XmlNodeToDocument output

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?

I read the Built-In Services Guide again. There are alot of input parameters that configure how xmlNodeToDocument will output results.

I used a combination of makeArrays=false and explicitly giving the documentTypeName to get the results I was looking for.

I am guilty of premature posting again.

Chris,

I think you might have missed to keyword search in this forum on “makeArrays” you could have seen some useful threads on the trick.

Anyways glad you have found by your self and sorry for my late response.

HTH,
RMG