XML not getting populated with all Data from Source

Hi,

I have run into an interesting situation where my XML generator is not populating entire CSV file I reading. Basically, I am reading CSV file and trying to send that as one batch to SAGE Intacct using XML generator. but, in turn the XML generator is sending each line from CSV as separate XML document.

Any help or insight is appreciated

Thank you

The XML Formatter snap will collect all of its input and output a single binary document. You could convert the output to a document using the “Binary to Document” snap, maybe with no encoding. You could then use a mapper to extract content and adjust content type, if necessary (ex: “application/xml”).

Hi,

Thank you, So I did what you suggested, Below are the screenshots for your ref and I still get multiple documents

Mapper

XML Formatter

Binary to document

Error returned by XML formatter

I am trying to achieve this , where all my lines should get populated in between tags.

            <create>
                <GLBATCH>
                    <JOURNAL>PYRJ</JOURNAL>
                    <BATCH_DATE>$BatchDate</BATCH_DATE>
                    <BATCH_TITLE>$BatchTitle</BATCH_TITLE>
                    <ENTRIES>
                        <GLENTRY>
                            <ACCOUNTNO>$GLAccount</ACCOUNTNO>
                            <DEPARTMENT>$Dept</DEPARTMENT>
                            <LOCATION>$Location</LOCATION>
                            <PROJECTID>$Project</PROJECTID>
                            <TR_TYPE>-1</TR_TYPE>
                            <AMOUNT>$Credit</AMOUNT>
                            <DESCRIPTION>$Description</DESCRIPTION>
                            <GLDIMEVENT>$Event</GLDIMEVENT>
                            <REFERENCENO>$ReferenceNo</REFERENCENO>
                        </GLENTRY>
                    </ENTRIES>
                </GLBATCH>
            </create>

It looks like the XML Formatter will only collect input documents into one output if a “Root element” is defined, otherwise, it will generate a separate binary document for each input document. So, maybe try that. It is my understanding that you want one XML payload to submit to Sage Intacct API. Thank you for the screen shots BTW.

Hi ,

Thank you for the reply. So, I gave it a XSD file created from XML file below. but the file generated is incorrect. where The GLENTRY node should get repeated but its not.

after I gave it XSD schema and root node here is formatter screenshot

not sure how can I send you the XSD don’t see a option to attach the XSD. Here is screenshot of what it generated

where as it actually should generate per XML above

Thank you,
Kamlesh

Kamlesh:
I apologize for not responding sooner – pre-empted. You should create a support ticket if you need further assistance, though think you are close.

Hi Matt,

No worries , thank you for your help so far. I will open a case :blush:

Kamlesh