How to insert a new line character inside CDATA tag in the source xml data file?

values for form fields in the xml data file is contained inside CDATA tags which is an Unparsed Format.
Eg: [CDATA[IBM-01 ~ DSHFSJDSJ ~ FGFGFJ, ~ VA 665665]] delimited by "~" char
Actual o/p:-
IBM-01 ~ DSHFSJDSJ ~ FGFGFJ, ~ VA 665665
Expected o/p is like :-
IBM-01
DSHFSJDSJ
FGFGFJ,
VA 665665
live cycle product does not interpret ~ as a newline character. Please suggest which character should be used instead inside CDATA section or if there is any other way to fix this?

I do not have any problem while using IE's XML parser
for XML+XSLT merging.That is because IE's parser does not implement XML correctly.
But when I use JAXP's Transformer object, it does not
preserve the new lines inside attribute values and
converts those into white spaces.That is exactly what the XML specifications say should happen.
>
----If you have text that contains newlines, you
should put it in an element, not in
----an attribute.
That would be my last solution. But I'd really hate
to change my logic just 'coz JAXP is not capable of
handling new lines inside attribute values. I may be
wrong... but If IE can keep those then there has to
be a way to do the same from server side merging....Sure. Write your own parser with the same bug in it. But you don't have any right to demand that other people supply you with parsers that work incorrectly.

Similar Messages

  • New line character (/n ) getting introduced in the response XML in Biztalk 2010

    Hello,
    In one of our enviornment, we have started facing an issue that the response XML does not get structered correctly, hence when the response is finally redenered, there is a /n in the response fields. this is for all string fields that do not have data . 
    e.g.
    If you see the sample below, FName field has data and hence is structered correctly, however HairColorCd does not have data.
    The opening and closing tags of HairColorCd are on different lines when the xml response is opened in a text editor, and when opened in IE, there is a space. When the BizTalk (hosted as a WCF )responds to the caller application there appears a '/n ' in the
    value of the field.
    The correct value should have been null, i.e. ""
    <FName>LISA</FName><HairColorCd>
        </HairColorCd><HairColorDesc>
        </HairColorDesc><EyeColorCd>
        </EyeColorCd><EyeColorDesc>
        </EyeColorDesc>                                                                                                                                                                          
    ANy ideas on why this is happenning?ALl other enviornments(with same code) is working fine.

    Hi Rachana,
    I have faced the same issue last weeks with BizTalk 2010. This happens with versions of BizTalk 2006R2+ and  if you are loading the message using XML Document in some stage. So if that is the case, please check everytime you load the content of the
    message using XMLDocument and do it this way:
    Xmldoc= new System.Xml.XmlDocument();
    Xmldoc.PreserveWhitespace=false;
    Xmldoc.Load(CONTENT); // or Xmldoc.LoadXml(CONTENTAsSTRING)
    Xmldoc.PreserveWhitespace=true;
    YourBizTalkMessage=Xmldoc;
    Do it in this sequence and your problem should be solved.
    Regards, Mazin - MCTS BizTalk Server 2006

  • How to Insert a new line in a clob

    hi,
    i want to create reports as multi-line clob data using PL/SQL procedures.
    is there any standard way of inserting a new line when iam generating
    this clob data based on the data i fetch from a different table.
    i short my question is "How to insert a new line in a clob?"
    i tried using the character '\n', but that was of no use.
    thanks in advance
    ramesh

    You could always do a:
    newLine := '
    Since PL/SQL allows a tring to span multiple lines.

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • How to insert a new line in MC1H(maintaining formula)

    How to insert a new line in MC1H(maintaining formula)
    Can anybody help me with  the steps

    Hi,
    1.run transaction SCC4 -> press Ctrl+F4 or the button for change ->double click one the row for your client -> on the field Cross Client Object Changes select Changes to the Repository and cross-client Customizing allowed -> SAVE
    2. run MC1H and now you will have access to insert new line in the table
    Regards Vassko!
    Edited by: Vasil Pavlov on Sep 16, 2008 9:51 AM

  • How to insert a new line in a jlabel???

    hi everyone
    i have a panel that have a jlabel... my problem is that i can make this label show line feeds even though im adding the "\n" escape character...
    please help
    thanks in advance
    this is my code
    <code>
    import java.awt.FlowLayout;
    import javax.swing.BoxLayout;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    public class Test extends JFrame{
    private String message = "This tool is used to set the database path\n" +
    "If the database is on the local machine, you should use \"localhost\" or \"127.0.0.1\"\n" +
    "If the database is on a networked machine, you should use the IP address of that machine\n";
    private JLabel help = new JLabel(message);
    private JPanel mPanel = new JPanel();
    private JPanel hPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    public Test() {
    setTitle("Database Path Updater");
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    setSize(450,350);
    setLocation(100,100);
    setResizable(false);
    setupComponents();
    initializeGUI();
    private void setupComponents() {
    mPanel.setLayout(new BoxLayout(mPanel, BoxLayout.Y_AXIS));
    private void initializeGUI() {
    add(mPanel);
    hPanel.add(help);
    mPanel.add(hPanel);
    public static void main(String[] args){
    new Test().setVisible(true);
    </code>

    bif_f wrote:
    thank you...that was really helpful but i just wanna know if using HTML tags is the only way to accomplish this task ????I think it's the only way because "\n" doesn't work and that's what I have learned a long
    time ago in this forum.
    another not related question: do you have any idea where the CODE tags are in this new forum???? i cant find them and i think you have noticed that i have inserted source code that are not CODE formatted....The forum has been updated you should notice that when you replied
    I don't know what's on there mind but they remove the code tags.
    you have to put it manually.
    e.g.
    [code]
    your code
    [[b]code]

  • How to insert a new line item in VA01/VA02 by using ABAP code?

    Hi Gurus
    i have a very tough requirement. the customer wants to insert a free goods after an item has been populated in VA01/VA02 automatically according to some certain rules. the input material may be a main material of a sales BOM.
    for example. let's suppose there is a material A who has two sub-material B and C which is maintained in a sales BOM via CS01/CS02. when the material A has been input in the line item in VA01/VA02, its quantity input and after the ENTER key has been clicked, another material D may be displayed in a new line as a gift if the condition met.  the condition relates to customer/material/quanity and these information are stored in a Z-table.
    on the other hand, if the material A is only a single material(not a BOM), the gift(material D) will also be filled automatically if the condition met.
    i have already enhance the FM cs_bom_explosion to filfill the requirment for BOM materials. whereas it is very hard to find the enhanment point for the single material.
    so my question is where is the correct place for me to insert the ABAP code, which decides whether the gift should be given or not and furthermore inserts the new line item into XVBAP. i tried to use MV45AFZZ, whereas the data is always inconsistant if a new line has been inserted. it is very strange that there is no temperary internal table storing line item data input in the table controal of VA01/VA02. system reads the line item data , line by line, via a system kernal function call.
    any hints are welcome. thanks

    HI Stephen,
    I have the same prolem. I modified the 5 global tables, but I don't see the new line in the screen.
    Can you help me with some details?
    Thx!
    Mihaela

  • Inserting a new line character

    Hi,
    In a validation routine returning a text message, I want to display all errors found separated by new line characters in the message displayed to the user. I have tried concatenating '\n' and chr(10) at the end of each message, but they do not work.
    Any suggestions, please.
    thanks,
    Peter

    Vikas,
    I tried what you suggested, but it did not have any effect. I put the region in Region Position 1 and also tried Page template Body 1. I looked at the source generated by your example screen after the error and found this:
    <tr>
    <td valign="top" class="t10ContentBody"><table border="0" cellpadding="0" cellspacing="0" summary="">
    <tr><td valign="top"><div class="t10messages"><div class="t10notification">1 error has occurred<ul class="htmldbUlErr"><li>Value must be specified.</li></ul></div></div><table cellpadding="0" cellspacing="0" summary=""><tr>
    <td valign="top"><script type="text/javascript">
    var d=getElementsByClass('t10notification');
    d[0].childNodes[0].nodeValue="";
    </script>
    <BR><BR><BR>The segment generated in my screen looked like:
    <tr>
    <td class="t3PageBody"><div class="t3Messages" align="center"><div class="t3Notification">1 error has occurred<ul class="htmldbUlErr"><li>Line 3 Resolution Date
    is missing<br></li></ul></div> </div><script type="text/javascript">
    var d=getElementsByClass('t3notification');
    d[0].childNodes[0].nodeValue="";</script>
    So it looks similar but the effect is not the same. Unfortunately, I am not an html/javascript expert so the solution is not obvious to me.
    thanks,
    Peter

  • How to insert a new line in table control created in screen painter

    hai,
    i am stuck up in the place where i need to insert a row of data in the table in screen developed in screen painter..cud some one help me out...

    You can try the following statement:
    MODIFY <DBtable> from table <itab>.
    Of course, you would need to append the user-entered data (from the screen) into the internal table first.
    Hope this helps.
    Sudha

  • Swing: How to insert a new line in JTextArea?

    As the title says, how do i position a text to the next line? The conventional "\n" doesn't seem to work in JTextArea....how can i resolve this?
    Thank You. :-)

    Is it running under windows?
    If so, try "\r\n"
    If that fixes the problem, use System.getProperty("line.separator") which returns the appropriate string ("\n", "\r" or "\r\n") for the system it's running on.

  • Insert and retrieve new line character in DB2

    Hi,
    I have a requirement in my project where I need to generate flat files to be sent to the bank for validation and for each record type in the flat file, I want to have a line separator inserted in the file. Now, the line seperator is configurable as a system option as per customers needs which is stored in the database (we are using DB2). Even though, I inserted '\n' (New line character) in the system option as a line separator, while retrieving from database through JDBC and appending to the flat file, it is not recognizing it as a new line character and simply appends '\n\ in the flat file.
    Please suggest any solution for this.

    >
    Why with notepad I don't see 1 record per line? how to solve this problem?
    Hi,
    this is the problem, seems so clear.
    To use wordpad as standard editor is not an answer, neither for me, nor for other people who receives mail.
    No solution is a better answer.
    Best Regards
    Fabio Boni
    Edited by: Fabio Boni on Sep 6, 2010 10:46 AM
    Edited by: Fabio Boni on Sep 6, 2010 10:47 AM

  • New-line Character for a file opened in BINARY mode for O/P

    Can anybody please tell me how to put a new-line charcter for each record in a file opened in Binary mode for O/p. I cant use text mode  for other reasons in my scenario.
    DATA: l_outdata TYPE xstring.
    OPEN DATASET file FOR OUTPUT IN BINARY MODE.
    Application logic to populate l_outdata
    TRANSFER l_outdata TO file.
    Any help, or attempt towards it will be duely rewarded,
    Thanks in advance,
    Sujit.

    hi sujit,
    1. how to put a new-line charcter for each record
    but how will you decide, at which POSITION,
    to put the new line character, if u have opened the file in binary  mode.
    2. However, if u know the exact positions(s),
      u can use  CL_ABAP_CHAR_UTILITIES=>CR_LF
      to insert the new line character,
    regards,
    amit m.

  • How to add a new line in pe51?

    Hi Team,
    I want to add anew field in pe51 form editor.
    for that i want to add anew line in pe51 form
    i went to pe51 tcode and selected background raidobutton.
    but from ther i dont know how to add a line at the required position.
    So please reply me on this as soon as possible.
    Thanks & Regards,
    Kranti.

    Hi Kranti,
    The reason, why you are not able to insert a new line in background could be that the maximum line size defined in attributes is already utilized. Thats why F7 doesn't work.
    1- From main screen of PE51, select your pay slip, click on attributes and than click on change button.
    2- Increase value in lines field and save changes.
    3- Go to background and try to insert new line with F7 keyboard key.
    I hope this is what you are looking for.
    Regards,
    Waqas Rashid

  • New line character in ABAP

    Hi,
    How do ABAP stores new-line character internally?
    Thanks and Regards,
    Sharadha

    Hi Sharadha,
    You can use :
    data :str1(100) type c value 'aabbddcd/ddhdhd',
          count type i.
    vlen = strlen(str1).
    do vlen times.
    if str1(count)= CL_ABAP_CHAR_UTILITIES=>NEWLINE
    then <NewLine Character processing>
    else.
    count = count + 1.
    endif.
    enddo.
    Cheers,
    Vikram
    Pls reward for helpful replies!!

  • Removing New Line Character in Input file

    Hi Experts,
    I Have a question about "New Line Character". I searched in SDN before posting this thread, But I didn't get answer.
    Question:
    Let me say my Client requirement first. After loading the data(Millions of Records) into SAP through LSMW, they asked write a program for validation of those loaded records based on I/P file. I wrote a program and It is success full.
    But, the problem is when file is in Application server in 'BIN' format, a new line character(#) is created. While comparing the last record of each line, it doesn't match. How to remove this new line character(#) in I/P file for each line of record? Please see the below records for example
    PROVINCIA DE BUENOS AIRE|   |1870|AR| #
    PROVINCIA DE BUENOS AIRE|   |1876|AR| #
    BOX 7407 PRINCETON|   |085437407|US|NJ#
    5756 2 A   CAPITAL FEDERAL|   |1431|AR|00#
    Note: This New line character is not matching the string "#".
    Please help me guys, so many objects are related with this concept. I appreciate quick response. Please.
    Thanks
    Sai

    Hi Arun, Ravi,
    I wrote the code like this, here 'fil_curre' is currency key.
    IF <l_wa_file_data>-fil_curre CS cl_abap_char_utilities=>newline.
              REPLACE ALL OCCURRENCES OF REGEX cl_abap_char_utilities=>newline
                                            IN <l_wa_file_data>-fil_curre WITH ''.
            ENDIF.
    While executing the code, the cursor here, simply jumps to next step.
    Any enhancements to this code or any new ideas?
    Thanks
    Sai

Maybe you are looking for