Forum Discussion
Specifically for your example pipeline, try adding a new Mapper with the following configuration immediately after your XML Parser:
(note the Pass through selection)
- mohamadelmardin9 years agoNew Contributor III
Thank you @del . This solution resolved my issue.
So let me put it differently now. Aside from my specific example and assuming that I have just to parse from XML to JSON and write it as-is without using any mapping/transformation to a JSON file to an external system but with the array format always enforced even with one element, Is there a way to do it in the XML parser by let us say for example checking the validate against XSD schema? Or do I have to use a mapper always to clean it and enforce the array on it?The reason I am asking again because the XML I gave was just a simple example but in my real scenario the XML payload I am working in has more than a 100 elements and multiple nested array structure. so that means I have to use a mapper for each expected array in order to check it and use the [].concat[element] on it ?!
- nshruthi7 years agoNew Contributor II
Hi,
Am also looking for solution for similar kind of issue with multiple elements having array structure, Did you find any solution in xml parser or added multiple mappers?
TIA,
Shruthi- mohamadelmardin7 years agoNew Contributor III
@nshruthi
No I didn’t. Unfortunately SnapLogic doesn’t have an out-of-box solution in the XML parser to handle XML array transformation gracefully. I have an enhancement request opened with support but I haven’t heard any resolution on it yet and still waiting…