Receiver File channel for XML files: with carriage return

Hi all,
we are using a receiver FILE channel to generate an XML file that is sent to an external partner.
The XML file looks good in a parser (IExplorer). But in fact there are not carriage return / line feeds between the XML tags
of the XML payload in the file.
Our partner now requires the XML file in a more vertical structure which means: for every tag a separate line (like it is displayed in a parser)
Does anybody know a more general way to convert to a vertical XML structure (so with carriage return line feed).
There is one entry in the SDN dealing with this topic but suggesting using an UDF. I think this is a very specific way.
I don't think it is a good way to change/enhance the message mapping just because of a general formating change.
Is it better to use an XSLT mapping as a second step in the interface mapping or a JAVA adapter module to convert ?
any experiences? suggestions? examples?
Thank you very much
best regards
Hans
examples:
original by XI receiver FILE adapter
<?xml version="1.0" encoding="UTF-8"?>
<MT_batchStatus><type>BS</type><header><message><messageSender>SENDER</messageSender><messageDate>20090723143720</messageDate> ... and so on
required:
<?xml version="1.0" encoding="UTF-8"?>
<MT_batchStatus>
<type>BS</type>
<header>
<message>
<messageSender>SENDER</messageSender>
<messageDate>20090723143720</messageDate>
... and so on

>
Hans Georg Walter wrote:
> Is it better to use an XSLT mapping as a second step in the interface mapping or a JAVA adapter module to convert ?
> any experiences? suggestions? examples?
In such a case, the best is to write an generic XSLT or Java mapping that will attempt to do the pretty printing/formatting of the xml.
The advantage of a generic one is that you can reuse the same class/jar for many other scenarios.
so the flow will be as below in your interface mapping;
1. your specific source to target mapping
2. the generic formatting class

Similar Messages

  • Problem of Creating Multiple Communication channels for multiple files

    Hi Everybody
    I have a very basic doubt but this struck me...
    For a file-XI-file scenario,if multiple files are coming from same FTP server but with different names then we have to create multiple communication channels for all the files of different names..but is this a intelligent approach?Can we do something so that only one communication channel can receive multiple files of different names?plz explain in detail if possible ASAP.
    I have another doubt as in File-XI-File scenario how the XI understands that a particular file is from this FTP server  needs to be send to another particular FTP Server?is it only the name of the file which we give in sender comm channel & receiver comm chaneel which determines this????that means this name should always be same?plz explain in detail if anybody knows?

    Thanks Aamir.I understood the solution.
    Correct me if I am wrong.......
    1)If there are multiple files with different names & different extensions in the sender FTP then we use-->
    2)if there are multiple files with different names & different extensions in sender FTP & I want only say files of 2 extension types(say .xml & .txt)then we use-->
    *.xml
    in one comm channel &
    *.txt
    in another comm channel rite??
    Also I wanted to ask that only two kinda files we can pick up through sender comm channel rite?
    .xml  and .txt(File content Conversion).Can we pick files of other extensions also?(say .doc,.xls)If we use as u said
    then files of all other extensions will also be picked up rite?bt hw will xi convert them into xml?plz explain......
    One of my other q is not answered yet.........all these same doubts are there for receiver communication channel.......but you all have not said nething abt the receiver comm channel........plz explain the answers to all these queries for receiver comm channel for a receiver FTP........ASAP......thanks once again.......

  • Conventions for XML-files

    Hi!
    I'm working on the text of a Bible translation that will be quite an extensive file when it's finished. The publisher has requested that I make an XML file in addition to the print-ready inDesign files they will use themselves. This is because there will be other publishers and companies that will want to use their translation (or parts of it) and it's inconvenient to send them inDesign files. An XML file with all of the paragraph styles, character styles and footnotes would be more convenient.
    Now, I've been trying to find information on how such a XML should look. Are there any code conventions for it? Most of the issues on this forum concerns importing xml files for use in indesign - but what I'm wondering is what I must think of when exporting XML files that other people will use?
    Also, is it possible to create inline xml tags based on character styles? (Such as bold, italic, suberscript etc.)
    I'm using CS6 and Mac OS X Lion.
    EDIT: Another thing just struck me. If anyone thinks that XML is not the best format for this then I'd very much like to hear about any other suggestions.

    InDesign has a native "Export XML" option, but that requires that you tag each separate item as an "XML item". Some of this can be automated, using "Map Styles to Tags". I don't have any experience with it, positive or negative, but if you exclusively used paragraph and character styles to layout your text it should be straightforward.
    Fastest way to get re-usable text in a not too difficult to parse file format is to export as Tagged Text. It's not really proper XML, but it may be Close Enough; if the above route is too complickated, try this (and send your publisher a test file).
    SimonLinden wrote:
    I've been trying to find information on how such a XML should look. Are there any code conventions for it? Most of the issues on this forum concerns importing xml files for use in indesign - but what I'm wondering is what I must think of when exporting XML files that other people will use?
    There are no "conventions". XML itself only has some very basic requirements (the way of writing element and attribute tags, correct nesting, some special characters that may not be used in plain text; that sort of things). So you can make up your own set of tags, or, to not confuse your receiving party, use a well-known set of tags such as XHTML (ie., <p> is for Paragraph, <i> is for Italic, and so on) or DocBook. There are also Scripture specific schema's of XML; http://ebible.org/usfx/ is one found with a quick Google.

  • How to write POJO for XML file.. i do not want to use JAXB or any other tec

    How to generate POJOs for the specific xml files.
    Each XML file will have elements name with Type. Which in turn related to some other xml file
    For example
    student.xml
    <student name"mystudent">
    <studentname type="firstname"/>
    <studentname type="firstname"/>
    <studentname type="firstname"/>
    </student>
    firstname.xml
    <studentname name="firstname">
    <stufirstname type="myfirstname"/>
    </studentname>
    myfirstname.xml
    <myfirstname name="myfirstname">
    <myname1>xxx</myname1>
    </myfirstname>
    like this there will be so many xml files interlinked.
    I would like to write POJOs for these xml files
    please let me know what is the best way to write (design the hirarchy of these xml files
    Thanks in advance
    srinivas

    Not at this time. You may submit your polite feedback to Apple using this webpage: http://www.apple.com/feedback/itunesapp.html

  • File Adapter : read XML file with data validation and file rejection ?

    Hello,
    In order to read a XML file with the file adapter, I have defined a XSD that I have imported to my project.
    Now the File Adapter reads the file correctly but it does not give an error when:
    - the data types are not valid. Ex: dateTime is expected in a node and a string is provided
    - the XML file has invalid attributes.
    How can I manage error handling for XML files ?
    Should I write my own Java XPath function to validate the file after is processed ? (here is an example for doing this : http://www.experts-exchange.com/Web/Web_Languages/XML/Q_21058568.html)
    Thanks.

    one option is to specify validateXML on the partnerlink (that describes the file adapter endpoint) such as shown here
    <partnerLinkBinding name="StarLoanService">
    <property name="wsdlLocation"> http://<hostname>:9700/orabpel/default/StarLoan/StarLoan?wsdl</property>
    <property name="validateXML">true</property>
    </partnerLinkBinding>
    hth clemens

  • 1 xml file to multiple xml files with 200 records in each

    Hello Experts,
    I have below scenario.
    Please suggest me which might be the best approch to work on.
    1) XML file to XML file
    I will have 1 pretty huge XML file which i need to break in multiple XML files with 200 records each.
      1) first approch i can have bpm in which i can split the file according to my requirement.
      2) Second approch i can create 2 scenarios in which 1st scenario will pick up XML file and create multiple flat files with File content conversion. Second scenario will pick up all these flat files and create XML files.
    2) XML file to XML file
    Or i can have multiple files with 1 record per file and i need to merge in multiple XML files with 200 records in each.
    So its kind of 1:N or M:N scenarios.
    Please tell me which is might be better performance and design wise.
    Or if you have any idea in any other way i can do this, then please reply as soon as possbile.
    Please tell me if you have OS command for the same or some script to run or anything which i can implement.
    Thanks,
    Hetal

    what is your senario? is it File to File?
    You can use multi mapping concept without BPM. You can handle the 200 records per message logic in the multimapping.
    Regards,
    Praveen Gujjeti.

  • Make DW default for XML files?

    I'm sure there's a way to do this that I'm missing, but I'd like to make DW my default app for XML files.  I know how this can be done on Windows (using "open with" and changing default), but I'm using Mac OSX.  I tried messing with the file types section of DW's preferences, but it didn't work.  Anyone know how to fix this?  Thanks.

    In the Mac Finder, select an XML file, and click More Info (or press Cmd+I - that's I, not a lowercase L) to bring up an Info panel. Expand the section that says Open With, and then select Dreamweaver from the pop-up menu (click Other, if it's not listed). Then click the Change All button to apply it to all XML files.

  • How to add payment advice for XML file filed in vendor account group

    Hi All,
    I have a requirment to add Payment advice for XML file field in vendor account group under payment transcation tap,
    kindly advice where i can add above mention field in vendor account group.
    thanks
    khaja

    done

  • Package for xml file insersion

    hi every body
    if any body know the link for the package of xml file insersion into oracle database. and also parser for xml file then plz tell me.
    my email address is " [email protected] "

    hi every body
    if any body know the link for the package of xml file insersion into oracle database. and also parser for xml file then plz tell me.
    my email address is " [email protected] "

  • File format error for xml file

    Hi!
    We are trying to upgrade our SAP 4.6C to EHP4.
    While "configuration roadmapstep", system asks us the XML file we have
    produced via solman. When we enter the path of the file system gives theerror below:
    The selected configuration file
    ("E:\downloadupg\SMSDXML_FKQ_20100917142727.656.xml") is not useable.
    Reason: "File format error"
    We have tried the txt file instead of xml file. The result was same.
    You can find the details of our system.
    4.6D EX2 32 bit kernel
    windows 2003 64 bit OS
    sql 2005 64 bit database software
    We have to upgrade our system until that monday.
    Please help us as soon as possible.
    Best regards
    Noyan Durna

    Hello Noyan,
    first, the official information: please refer to note #1022704 - for source release 4.6, the TXT file has to be used instead of the XML file. Otherwise, 'File format error' will occur as in your case.
    But since you tried this option, you should turn your attention to the XML itself, which must contains entries that are not handled by function module OCS_GET_UPG_STACK_INFO in the 4.XX source systems. The function module only expects the entries [SPAM_CVERS], [PRDVERS] and [SWFEATURE].  Any other entries present on the file can cause an error. 
    Please check your file for other entries like [APP_SYSTEM], [SWFEATUREINC], [TECHUSAGES], [INITIAL_CVERS], [EXPORT_CVERS], and [DVD_SET]; this might be the cause of the error. 
    In order to workaround this, you can either edit the file and remove the invalid entries or recreate it (w/o this entries also).
    Best regards,
    Tomas Black

  • Skipping the content conversion if the input file is an xml file.

    Hi,
    My source folder contains both text files and xml files.
    I want to skip the content conversion if the input file is an xml file and the same Content conversion as to work if the input file is a text file.
    Is there any way to achieve this?
    Regards
    Divia

    Hi,
    I think u hv to create 2 separate Communication Channels.............. 1 for XML (without Content Conversion), & other for TXT with Content Conversion.
    In 1st CC give file name as *.xml & in 2nd give file name as *.txt
    Thanks,
    Maheshwari

  • Loading an xml file from an xml file

    I'm trying to load an xml file from an xml file, but I'm
    having problems. My first xml file is really simple - it only
    contains one attribute with the name of another xml file in it
    (eventually I will have multiple xml files in here and run a loop
    on them...this is why I want to load an xml file from an xml file).
    Currently, with the code below, I can get the main xml file
    to load ("main.xml"), but I cannot get the secondary xml files to
    load FROM the main.xml.
    I want to then take childNode values from the secondary xml
    file and use them within my .swf in text boxes and whatnot.
    Any guidance? I think I'm going wrong on the line where I'm
    saying "i.newxml.load(i.attributes.location);"
    - How can I get this to work?

    johnypeter:
    I tried changing the code inside the loop to use just
    "newxml" instead of "i.newxml", and I declared with "var newxml =
    new XML();" - was this what you were thinking?
    kglad:
    The reason I tried to use the loadXML() function in the loop
    was so that for each node in my "main.xml" it would load the new
    xml file listed - this is a no-no? Do you have any ideas as to what
    I could do?
    For the for-loop, what should I change in it? I'm not great
    with loops so I tried to modify some code from another loop I found
    in another forum thread - not the right way to do it here?
    Also, what should I trace? The value of the _root.address, or
    i.attributes.location? I have created dynamic text boxes on my
    stage to see if the correct value from the xml file loads (ie. the
    name of the xml file within the xml file) and it does, but now I
    don't know how to put that information into ANOTHER loadXML()
    function and get the node information from it - does that make
    sense???
    Below are the examples of the xml files I am using. In the
    first one, main.xml, I will have a list of multiple xml files, each
    with the same nodes and elements as in the details.xml file
    (different values, of course).
    This is just to give you an example of what I'm trying to
    accomplish - pulling ALL the addresses and phone numbers from
    multiple xml files. I cannot manually collect this information, as
    it is dynamic, and will be updated in each individual details.xml.
    I was hoping to collect the information by simply adding to and
    updating ONE xml file - main.xml.
    Do you think this can be done? Am I going about it the wrong
    way? I'm quite limited in AS knowledge, which is why I'm piecing
    together code from other posts!

  • Error could not find file/pathurl for id file::QTMRead

    Hi,
    I'm very puzzled as to this error I have gotten on multiple projects when trying to check back out.
    Error could not find file/pathurl for id file::QTMRead
    I'm halfway through a project with a deadline of next week, and have been using edit proxies, so am just worried about being able to export the final project if the Server cannot find the file.
    It seems to get this error after a glitchy upload where the server locks up and I have to force quit. Has anyone had this message before/have any ideas how to solve it?
    Some speedy help would be very much appreciated.
    Thanks,
    Dania

    You need to make sure that you imported the Reports.xml file into the FDM application. Also, you will want to login to the application using the workbench client and click on the Reports tab and expand the English > Check Reports and right-click on the check report and choose "Set as Validation Report".

  • How to refer an xml file within a xml file?

    Hi
    I would like to refer a xml file within a xml file from where i would like to extracts some elements & attributes.
    Plz, suggest me hot to do.
    Thank you.

    You mean you want to link the file thru some resource pointer and then make the external file availabe for parsing and other processing operations?

  • How to create a file object for a file on Remote Server? UNIX

    Hi all,
    I am working on two servers A and B. BOTH ARE UNIX MACHINES. My java class exist on server A and executes on same server. The file that I need to process resides on server B. (Lets call it test.txt in MYTEST directory. So path will be /MYTEST/test.txt on server B) I need to do few things before I can process it:
    1) Check if file exist
    2) If it does FTP it to Server A. (I already know how to.)
    For both of these tasks, I need a File object for that file.
    My problem is that I am unable to set it up.
    \\B\MYTEST\test.txt will not work on UNIX. I already tried that. (It only works on Windows)
    I tried:
    /B/MYTEST/test.txt ---- Does not work
    B:/MYTEST/test.txt ---- Does not work
    :B/MYTEST/test.txt ---- Does not work
    B:MYTEST/test.txt ---- Does not work
    All of these instances say the same thing: "File does not exist."
    Any ideas? Please help!!!
    -Chirag

    I by no means want to sound belittling... so don't take me that way..
    You need to understand the basics of files, and networks. You can't check if a file exists on another machine if you don't have a network protocol to communicate with. The reason \\ works under windows is because you are using an invisible (to you) network protocol. You probably know it as windows sharing. If your file were not shared under it's own name, that method wouldn't work (I'm assuming your entire drive is shared without a password... a horrible security flaw...but one thing at a time)
    You can use FTP protocol to check if a file exists. You can either send the raw text FTP commands through a socket connection in java, or you can use a freely available FTP java API to make it a bit more simple. You could also write a small java server on the other machine, and have it tell you what you need to know with a socket connection. In this way, you have created your very own network protocol.

Maybe you are looking for

  • Two short questions on Interactive reports

    Hello, I have two questions on passing filter to an Interative report 1) the text that I send to the filter can contain commas. Is it possible to work around this? (comma is interpreted as splitting the filter values) e.g. f?p=104:19:::NO:19,RIR:IR_B

  • Videos from itunes not syncing

    Ok so I bought two videos from iTunes and they won't load on my ipod. The error message says they aren't the correct format...but i got them from itunes. what do i do?

  • Repairing OD Master/replica tress.

    We had an issue with our OD Master and it's 11 replicas. Apple Support said: 1. Export Users, User Groups, Computers and Computer Groups from the OD Master. 2. Downgrade the Replicas to stand-alone. 3. Downgrade the Master to stand-alone. 4. Promote

  • ALV table Functionalities

    Hi All,         I am using ALV table in my application(Standard table) ..         I want to customize this table.         I want to edit the existing functionalities and also want add few more buttons in the table.       what is the code to do this..

  • Using analytical functions in procedure

    I try to use the Corr Function with an Insert Into Command. insert into corr_result (CorrVal) select corr(Val1,Val2) from risk_Corr; when I use it in SQLPlus directly it works. When I use it in a procedure I got the error message : PLS-00201: identif