Page 1 of 1

XML out file format issue

Posted: Mon Dec 17, 2012 7:19 pm
by akonda
Hello

I am trying to generate xml file using using xml output stage. The xml file is getting created but the format of is not as expected. Please suggest if anybody come across this before.

Design:

oracle connector -> transformer stage -> xml output stage.

Getting output as below:

<claim>
<casetype>
U
</casetype>
<casedate>
2012-12-13 17:55:25
</casedate>
<esn>
100000002074127
</esn>
<newesn>
1000000020
</newesn>
<trackingnumber>
trac:12345
</trackingnumber>
</claim>


Output Need like below:

<claim>
<casetype> U </casetype>
<casedate> 2012-12-13 18:11:09 </casedate>
<esn> 100000002074135 </esn>
<newesn> 1000000020 </newesn>
<trackingnumber> trac:12345 </trackingnumber>
</claim>
<claim>


Thanks

Posted: Mon Dec 17, 2012 7:40 pm
by eostic
You'll see the answer to this one if you search around.......find the "formatted xml" check box and turn it off --- you want NO formatting. ...and then start opening the xml in your browser or other XML-aware tool. XML should just be a continuous string without any CRLF's, returns or other formatting. As far as xml is concerned, all of that is just "noise".

Ernie

Posted: Tue Dec 18, 2012 11:02 am
by akonda
Thanks for your reply.

Sorry I did not find similar post in my search.

If I remove the "Generate Formatted Output" check box, entire record is displaying in single line.

<claims><claim><casetype>U</casetype><casedate>2012-12-13 17:55:25</casedate><esn>1000000020</esn><newesn>1000000020</newesn><trackingnumber>trac:12345</trackingnumber></claim><claim><casetype>U</casetype><casedate>2012-12-13 18:11:09</casedate><esn>1000000020</esn><newesn>1000000020</newesn><trackingnumber>trac:12345</trackingnumber></claim></claims>.


Do I need to set format using transformer stage before XML Output stage ?

Posted: Tue Dec 18, 2012 11:23 am
by chulett
akonda wrote:If I remove the "Generate Formatted Output" check box, entire record is displaying in single line.
As it should. XML does not need any special formatting, it's just "noise" to the parser as Ernie noted. Open it up in your browser or something that understands XML if you want to display it formatted but there's absolutely no reason to worry about building it like that.