on 01-07-2011 6:35 AM
Hi,
I have a xml file which i need to convert to CSV file.
I am able to do it for a single node but when i try to do it for 2 nodes ,then its not happening.both the rows are coming in the same line but I want it to come in separate lines.I have gone thru the sdn and sap documentation .There I could find only the properties of Content Conversion or conversion for only one node.
Could anyone help me with the content conversion parameters to be maintained on the recevier side.
Xml Input ---
<?xml version="1.0" encoding="UTF-8"?>
<ns0:File2CSV_Src_MT xmlns:ns0="http://Rohit_File2CSV">
<Result>
<Student>
<Name>Rohit</Name>
<English>34</English>
<Maths>34</Maths>
<Hindi>5</Hindi>
</Student>
<Student>
<Name>Das</Name>
<English>34</English>
<Maths>34</Maths>
<Hindi>5</Hindi>
</Student>
</Result>
</ns0:File2CSV_Src_MT>
The output I want is -
Rohit,34,34,5
Das,34,34,5
Regards,
Rohit
Hi Rohit,
You need to configure Content converstion at reciver file adapter.
Recordset structure as : Result,Student
Change the parameters as:
Result.addHeaderline: 0
Result.fieldSeperator : nl
Student.fieldSeperator: ,
Student.endSeperator: nl
Ref: /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
Thanks,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks to all for helping me out.
regards,
rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am getting the output in 2 rows in wordPad and XML editor but not in NotePad.
Output in WordPad/XML editor -
Rohit,34,34,5
Das,34,34,5
Notepad -
Rohit,34,34,5Das,34,34,5
So what should I do to get hte same output in Notepad..
regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Notepad and Wordpad are differently processing/displaying the special symbol of new line. If you use CRLF as the line separator, then the result will look the same for both the editors.
So that should be something like: \r\n (carriage return + new line/line feed).. in the content conversion that would become => '0x45''0x42'.
Hi,
Have you used below parameter in your FCC?
Student.endSeparator 'nl'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.