XML to recordrecordlist

I am reading an XML file into a document into a record – it all works fine as long as there are two or more children per branch. However, if there is only a single instance of an XML tag (resulting in a single record branch) instead of a RECORDLIST i get a RECORD – this causes all sorts of problems since i cannot loop over it. What should I do? Can I forge all XML to record conversions to be a loop?

In the documentToRecord call, are you specifying a recordName parameter?

try including the name of the node you have to get as a record list in the arrays field. This willwork.
There are other ways too.

You have two options - supply a recordName as Rob suggested (assuming your record reference indicates that the element in question is a recordList), or set the arrays parameter to tell webMethods which nodes are supposed to be recordLists.

Will Kriski

Thanks everyone for your help! This worked very well