XML to recordlist/record

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 step, you can give the names of the nodes that you want as recordLists in the arrays field.
This should help.

I’m running into the same issue on 6.0.1, and my first bit of fun, is that, even with the admin account, I can’t see the documentToRecord service… I can find it in developer (pub.web.documentToRecord), but can’t call it…

I’ve tried on the xmlNodeToDocument service setting the arrays parameter to the full node path, and setting the makeArrays parameter to true, but no love… still looks like a single document rather than a document list with one entry…

found at least part of my issue… I had to set the entry in the arrays parameter to the name of the xml node (items)… NOT the full path (/order/items), so I’m a little concerned that if my XML document contained a similarly named element later in the document, that wasn’t a list, that it would try to convert it to a list as well. Also, I had to set the makeArrays parameter to true (obviously… :slight_smile: )

Still don’t have any idea why I can find services but not navigate to them