Page 1 of 1

XML File Output Format !

Posted: Tue Feb 17, 2015 8:44 pm
by allavivek
Hi All

I am working on generating XML Files and i have couple of issues.

I am using XML Output stage to generate files.

1. The output XML file after Job finished, i don't see the below header, i checked for different options to generate this but i couldn't find any. Any way to generate below header in XML Output stage ?

<?xml version="1.0" encoding="utf-8"?>

2. The generated output XML has tags and data as below.
<timestamp>
2015-02-13 13:35:21
</timestamp>
<sub-id>
9234
</sub-id>

How to generate in below format.

<timestamp>2015-02-13 13:35:21</timestamp>
<sub-id>9234</sub-id>

Thank You...

Posted: Tue Feb 17, 2015 9:22 pm
by eostic
First, what kind of header are you getting?

Second, crlf and spaces are just noise in xml. Open them in your browser and both will look the same.

Dont get forced into a formatting requirement for xml. Tags are tags....with or without crlfs and spaces in the data...

Ernie

Posted: Wed Feb 18, 2015 9:23 am
by allavivek
Hello Ernie

The header i am getting is below , "submission" is the root element.

<submission xmlns:ns1="http://www.xxxx.org/ns/2010/xxx/xxx" guid="" vendorid="19489">


Regarding format, my client is submitting xml files to external vendor and the tool which the vendor is using is complaining about the spaces before tags. Apparently the tool the vendor is using is not able to load the file. They are expecting the content to be as :

<org-id>2668</org-id>

instead of

<org-id>
2668
</org-id>

Thank You.

Posted: Wed Feb 18, 2015 10:35 am
by chulett
They shouldn't be expecting any formatting. Turn off the formatted output option you have on right now.