on 12-14-2006 4:36 AM
Hi All ,
I am using file adapter to write a xml file.
By default the file adapter adds
<?xml version="1.0" encoding="utf-8" ?>
<ns1:MT_TEXT xmlns:ns1="http://NAMESPACE">
<NAME>Rahul</NAME>
</ns1:MT_TEXT>
But i want the XML File Like this way..
<MT_TEXT>
<NAME>Rahul</NAME>
</MT_TEXT>
Is this possible without using File Content Conversion and then using java code to stimulate the creation of XML file.
Regards,
Sumit
Rahul,
This is explained in this blog as well,
/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rahul,
Why do you want to do that?An XML file should always have the first line as , <b><?xml version-----></b> .
If you are seriouly looking at a way to remove the <?xml version-----> but continue to have a XML payload in the file, then there is no standard way. Write a Module and remove that line!!!
Regards,
Bhavesh
Hi Bhavesh,
I know it is a standard for well formed XML documents.
The thirdparty whom i am giving the text file doesnt want that line.
Can you please temme in brief how to write a module and remove that line..
or you think file content conversion using java code would be better.
Thanks & Regards,
Rahul
Hi,
You can do this using Java Mapping. In Java Mapping you can create your own contents that is written to the output stream. You have many blogs regarding Java Mapping.
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
You can even avoid content conversion and parse the csv file in Java Mapping itself. Take a look at the following blogs:
/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
/people/venkataramanan.parameswaran/blog/2006/12/12/java-mapping-to-handle-flat-files-in-sap-xi
Regards,
P.Venkat
Message was edited by:
Venkataramanan Parameswaran
Rahul,
Modules --> This article should help.
Another option istead of using Graphical Mapping, use Java Mapping and in the output stream do not create the line <xml version.... >
I would prefer going the module way though!
Regards,
Bhavesh
Hi,
Your XI xml file will surely contain all these values.
If you dont want to use file content conversion then you can use java coding.
thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This can be done withot java coding and content conversion.
Go to your Target Message type in the IR and there you will find the field NAMESPACE. Delete the namespace and then your XML will be created without Namespace.
But, you will have to reload the target message type in the mapping and redo the mapping and activate the changes for the change to be seen int he target file.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wrong Answer .. deleted
Message was edited by:
Himadri Chakraborty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.