Remove Carriage Return between elements

Hi All,
Below is my xml document:
<Message>
<AccNo>100</AccNo>
</Message>
I want to convert the above document as:
<Message><AccNo>100</AccNo></Message>
I mean, without carriage return in between elements. The above two documents are generaring a different message signature. Please help me; as how can remove carrige returns in between elements.

You're talking about line breaks between elements; are there any line breaks inside elements? If there are, you probably want to preserve them, but for now I'll assume all line breaks must go.
What form is the XML document in? If it's a string, you can do a simple replaceAll(): str = str.replaceAll("[\r\n]+", ""); If it's in a file, you can read it in line-by-line with a BufferedReader and write it to a new file without inserting line breaks.

Similar Messages

  • Remove carriage return between text two objects

    How to remove carriage return between objects. 
    I have a text box and table  I want to remove carriage return between them. 
    Also I have a table with two columns and I want to remove carriage return between these two columns.
    Thank You in advance.

    Hi ,
    Try like this ,
    --To replace Carriage return
    =REPLACE(Fields!Column.Value, CHAR(10), "" )
    --To replace Line feed
    =REPLACE(Fields!Column.Value, CHAR(13), "" )
    --To replace Tab
    =REPLACE(Fields!Column.Value, CHAR(9), "" )
    And also , ConsumeContainerWhitespace property to remove blank space -
    http://beyondrelational.com/modules/2/blogs/115/posts/11153/consumecontainerwhitespace-property-to-remove-blank-space-in-ssrs-2008-report.aspx
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • How to import multiple elements into the same line in structure Framemaker (i.e. no carriage return between elements).

    I have a successful import process going now (DTD, EDD, ReadWriteRules, and Template) that imports a number of elements, but each onto a separate line. I now need to import three elements in a row on a single line. How do I set up to do that?

    Dear Wild,
    A container element a structured document can either be a paragraph element, that contains one or more complete FrameMaker paragraphs (elements corresponding to chapters, titles, and list items, for instance, are typically paragraph elements), or a text range element, with content that comprises part of a paragraph. An EDD doesn't need to identify paragraph elements since containers are paragraphs by default. You make an element a text range with a text format rule that specifies TextRangeFormatting.
    In your case, if you have a wrapper element that contains the three elements you want to appear on a single line, in the EDD, add a text format rule for the three inline elements that specifies TextRangeFormatting; specify the formatting of the overall paragraph in the element definition for the wrapper. If you don't have a wrapper, though, the overall paragraph will inherit formatting from whatever the containing element is; the containing element may be the document's root element or a major division such as a chapter or section. If that element's formatting is not what you want here, you can leave the "inline" elements as separate paragraph so that you can specify their formatting, but make the first two run-in heads (which is done in the Placement property of the pagination properties).
    --Lynne

  • Need to remove carriage returns, spaces, etc.

    Hello,
    I am trying to build a string that is on one line,
    1,2,3,4,5,6,7,8,9
    however, I wind up with each number on a separate line.
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9
    My code looks like this:
    var xxx = "";
    for (var i=1; i<= nNumWords; i++) {
          global.srchVals[i].name = "Payor Mix";
       global.srchVals[i].mode = 0;
       xxx = i;
       if (i < nNumWords) {
       xxx = xxx + ",";
      //xxx = xxx.replace(/\s+/g,"").trim();
      } else {
       xxx = xxx;
       //xxx = xxx.replace(/\s+/g,"").trim();
          var PMItms = [xxx];
       //console.println(xxx);
    I tried using the following line of code to remove carriage returns and spaces:
       xxx = xxx.replace(/\s+/g,"").trim();
    But it keeps on giving me the following error:
    TypeError: xxx.replace(/\s+/g, "").trim is not a function
    Any help is appreciated.
    Thanks
    Linda

    I just want to make sure I'm approaching this problem the correct way.
    I am trying to build a string that is on one line,
    1,2,3,4,5,6,7,8,9
    however, in the debugging console, I wind up with each number on a separate line.
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9
    Will "Trimming" the string correct the issue?
    Thanks
    Linda

  • Removing Carriage Returns within a Textarea

    Hi,
    Just wondering if someone could please let me know how to remove carriage returns from a Textarea after submitting the page?
    Within my PL/SQL process, I have used both REPLACE and TRANSLATE on both CHR(10) and CHR(13) but unfortunately it stills comes out the other end as follows:
    Description :this
    is
    a
    testWould like it all on one line minus the carriage returns.
    Thanks.
    Tony.

    The code I showed works for me. Computations and processes work similarly except that in a process you have to save the value in session state whereas in a computation that's done for you. Show your code or put an example on apex.oracle.com if you can't get it to work and I'll check it.
    Scott

  • Pasring multiple fields into the Description field with a carriage return between each in Orchestrator

    I have a Service Request that is entered in through the Self Service Portal.  This service request has 4 different prompts in the Request Offering.
    This will actually eventually become a Change Management Request.
    What I would like to do, is grab the 4 User Inputs, and place them in the Description field of the Change Management Request.  I can get them to show up in the Description, however, I would like to be able to add a carriage return between each User
    Input (along with a description of what's being put in).  How can I do that?
    Right now, it looks like this Username: Name Manager: Manager
    Start Date: Start Date Needs Mail?: Y or N
    I want it to look like this:
    Username: Name
    Manager: Manager
    Start Date: Start Date
    Needs Mail?: Y or N

    Thank you.  This is what I was looking for.
    For those figuring out what to do:
    Add the Run .Net Script command to your Runbook.
    Under Details, selec PowerShell for the Type, and in the Script $Desc = "Username:
    Username field from the Published Data" + "`n" + "Manager: Manager field from the Published Data" + "`n" + "Start Date:
    Start Date field from the Published Data" + "`n" + "Needs Mail:
    Needs Mail field from the Published Data"
    ($Desc is just the variable I used, and can be whatever you want)
    Under Published Data, Add the field you want to output and make the Variable name what you used above without the $
    Then do Update Object and Update the Description with the published data from your PowerShell Command.
    I do this, and my data is passed successfully and it shows up in my notifications, however the carriage returns are not there. It looks the same as it did before I added the powershell right before Update Object. 
    ? Anybody else not getting this to work ? 

  • Using `n how can i add two empty line (two carriage return), between these two lines in the output file?

    hi friends
    using `n   how can i add two empty line (two carriage return), between these two lines in the output file?
    PS C:\> $env:COMPUTERNAME | add-content c:\file.txt
    PS C:\> $Env:USERDOMAIN  | add-content c:\file.txt
     i tested "$env:computername`n`n`n$env:userdomain" | add-content c:\file.txt   but it results in 
    myPCMyDomain
    but i wanted the contents of the output file be like this:
    MyPC
    #empty line here 
    #empty line here
    MyDomain
     i tested many other forms but didn't work.
    thanks

    I tried it, as well. The line breaks were respected in the PowerShell console, Programmer's Notepad, and Word; they weren't in Notepad.
    You are using a Unicode file.  Locale is what?
    If you just want notepad compatible line breaks then do this:
    del file.txt ; "$env:computername`r`n`r`n`r`n$env:userdomain" | add-content file.txt ;notepad file.txt
    Look in hex to see that `n is ^L or 0xA and is only one character.  CrLf is 0xD 0xA - two characters.
    My programmers editors and VS all understand a single ^L as a line break so does PowerShell.  Only DOS/Notepad and other utilitis don't understand this..
    ¯\_(ツ)_/¯

  • Remove Carriage Return from a TextEdit field

    Hi All,
    I have a tableview, of which the last field Description, is of type TextEdit. Not only this, when the data was migrated from a legacy system to SAP, either the last field with the value (If Description has value, Description field, else the field before Description) has 2 '##' at the end of it.
    The 2nd # is EQ to
    cl_abap_char_utilities=>newline
    , which I can remove using
    REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>newline IN <fs> WITH ''.
    But the first # is having the Hex Value 0D00, which is EQ to Carriage Return. CR_LF is Carraige Return and Line Feed, but here, I need to remove only CR.
    Can anyone give me the right solution?
    I tried moving this data to a string field and then do a REPLACE All... IN BYTE MODE, but again, it didn't work.
    Thanks and Regards
    Gladson Jacob

    Hi Patrick,
    The program's ending with a Short Dump. The code snippet is as below.
    DATA: it_contract TYPE TABLE OF zbpa_bp_contract,
          xstring_val TYPE x VALUE '0D00',
          value2 TYPE x VALUE '2000',
          string_value TYPE string,
          xstring_value TYPE xstring,
          stringtable TYPE TABLE OF string,
          reply_value TYPE TABLE OF tline.
    FIELD-SYMBOLS <fs> TYPE zbpa_bp_contract.
    SELECT * FROM zbpa_bp_contract
      INTO TABLE it_contract.
    *  WHERE id BETWEEN 2316 AND 2328.
    LOOP AT it_contract ASSIGNING <fs>.
      string_value = <fs>.
      APPEND string_value TO stringtable.
      CALL FUNCTION 'CONVERT_STREAM_TO_ITF_TEXT'
        TABLES
          text_stream = stringtable
          itf_text    = reply_value.
    ENDLOOP.
    The dump description is as follows
    Error analysis
        At the statment "DESCRIBE" only character-type data objects are supported at the argument position "TEXT_STREAM", but no strings are supported (data types STRING and XSTRING).
        In this particular case, the operand "TEXT_STREAM" has the type "g".
    <b>Please help.</b>
    Thanks in advance.
    Gladson
    Message was edited by:
            Gladson Jacob
    Message was edited by:
            Gladson Jacob

  • How do we remove Carriage Return (line feed) inserted in FCC files

    Hi Experts,
    The file that we generate has a carriage return at the end.
    Is there any way in which we can remove this carriage return (line feed) from the file?
    The FCC parameters used at our end are as below:
    structure.filedNames:
    structure.fieldFixedLengths:
    structure.fixedLengthTooShortHandling: Cut
    Kindly tell us a solution ASAP.
    Thanks & Regards
    Dhwani

    Dear All,
    Let me elaborate on my query
    Consider that the files output looks like below:
    12  34  45  545 5454 UL
    23  33  43  434 4545 FG
    45  44  44  586 6535 GM
    Now there is an extra line(Carriage Return) getting inserted after the last line 45  44  44  586 6535 GM  which is not required at our end.
    The cursor of the file instead of stopping on the last character M, points to the next line.
    Can you please suggest how to remove this extra line from the files.
    I dont understan how will remove context help in this case.
    Regards
    Dhwani

  • Remove carriage returns from a field in an oracle table

    I have a field that is defined as a LONG in my oracle table; the data contained in this field has carriage returns/line feeds (it's free form text); as i'm selecting data from this field, i need the carriage returns removed so that the data from this field all appears on one line.
    I tried using the TRANSLATE function to convert the carriage returns to something else, but that doesn't work.
    Example:
    Select comment from Notes:
    COMMENT
    the applicant called for an appointment;
    an exam was scheduled for 4/1/05 at 9am;
    called applicant to confirm app
    this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled for 4/1/05 at 9am; called applicant to confirm app"
    How can i do this? Can the decode function be used to remove the carriage returns in this field?

    when i used translate its giving correctly,
    SQL> ed
    Wrote file afiedt.buf
    1 select translate('the applicant called for an appointment;
    2 an exam was scheduled for 4/1/05 at 9am;
    3 called applicant to confirm app
    4 this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled
    5 How can i do this? Can the decode function be used to remove the carriage returns in this field
    6* ',' ') from dual
    SQL> /
    TRANSLATE('THEAPPLICANTCALLEDFORANAPPOINTMENT;ANEXAMWASSCHEDULEDFOR4/1/05AT9AM;CALLEDAPPLICANTTOCONF
    the applicant called for an appointment; an exam was scheduled for 4/1/05 at 9am; called applicant t
    SQL> ed
    Wrote file afiedt.buf
    1 select 'the applicant called for an appointment;
    2 an exam was scheduled for 4/1/05 at 9am;
    3 called applicant to confirm app
    4 this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled
    5* How can i do this? Can the decode function be used to remove the carriage returns in this field
    SQL> /
    'THEAPPLICANTCALLEDFORANAPPOINTMENT;ANEXAMWASSCHEDULEDFOR4/1/05AT9AM;CALLEDAPPLICANTTOCONFIRMAPPTHIS
    the applicant called for an appointment;
    an exam was scheduled for 4/1/05 at 9am;
    called applicant to confirm app
    this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled for 4
    How can i do this? Can the decode function be used to remove the carriage returns in this field?
    SQL>

  • How to remove carriage returns in message mapping

    Hi Experts,
    I am getting carriage returns in one of the source field, i need to remove those carriage returns and i need to pass it to target field, can anyone suggest me how can i achieve this.

    Hello,
    Are you getting only CR or CR+LF (line feed) ?
    In this case - CRLF - you can use content conversion in your sender adapter:
    <recordset_structure>.fieldSeparator = 'nl'
    So in your receiver adapter you can replace any special char by 'nl' again.
    Check these links.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm
    Regards,
    Diego Estanguini Gabriel

  • XI: Remove Carriage Return +Line Feed at end of XML

    Hi All,
    Scenario
    Currently, we have a JMS --> XI --> IDOC scenario. The Sender Service always sends a CRLF (Carriage Return & Line Feed+) without fail at the end of each xml file once this non-sap system finishes its transaction.
    Example
    <STARTOFXML>
    Data------
    </ENDOFXML>CR+LF
    Question
    Is it possible to remove this from XI JMS Sender Adapter? From the receiver Service (JMS) this is possible.
    Cheers!
    Sulaiman

    Why do you want to remove this? Does this lead to errors?
    Regards
    Stefan

  • HTML Textarea removing Carriage Returns

    Hi,
    Hoping someone can assist, I am retrieving some data from a table that currently consists of carriage returns but when I try and retrieve this information via Ajax and pass it back into the HTML page textarea field within ApEx, the value returned is one continuous string.
    All my carriage returns are removed.
    Can someone please assist, possibly using a javascript solution or some other type as to how I can preserve the carriage returns.
    Thanks.
    Tony.

    Hi Tony,
    I suspect the problem is simply due to the way HTML handles line breaks, which is to say, it generally ignores them. For example, this html:
    <p>To be or not to be, that is the question;
    Whether 'tis nobler in the mind to suffer
    The slings and arrows of outrageous fortune,
    Or to take arms against a sea of troubles,
    And by opposing, end them. To die, to sleep;
    No more; </p>would be displayed in a browser as:
    To be or not to be, that is the question; Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing, end them. To die, to sleep; No more;
    One way to get around this is to wrap the string in {font:Courier}&lt;pre&gt;&lt;/pre&gt;{font} tags; another would be to replace the carriage returns with {font:Courier}&lt;br&gt;{font}
    Hope this helps.
    tx, --Jen                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Remove Carriage return from string

    I have a free text area on a BSP (a form). When users type continuously in this area the text gets wraped. When the BSP is submitted it generates a sapscript form and the text area is printed on the form, but it has '##' which are placed where the text wrapped round. I would like to remove '##', so tried the following:
    replace all occurrences of '##' in text_area with ' '.
    This did not work as the '##' are not recognised presumably because they are some type of carriage return and not in fact has marks.

    If you dont have access to the class CL_ABAP_CHAR_UTILITIES, do this instead:
    DATA: crlf(2)   TYPE x VALUE '0D0A',
          itab      TYPE TABLE OF string,
          w_input   TYPE string.
       w_input = '<contains the text with the line feed.>'.
       SPLIT w_input AT crlf INTO TABLE itab.
    Regards Michael.

  • Removing Carriage Returns

    I have a table with a field that contains data such as this,
    and I want to remove all of the carriage returns but I am having
    difficultiy. I have tried replacing the chr(13) and the chr(10) but
    no such luck. Can anyone help? Thanks!
    ==== start of code block ====
    Part Number: 1307 G9<BR>
    Finish Family:
    CHROMES<BR>
    Finish/Color:
    STERLING NICKEL<BR>
    Dimensions:
    1 1/4 INCH DIAMETER<BR>
    Collection:
    BRASS &amp; STERLING TRADITIONS<BR>
    ==== end of code block====

    Hi,
    For me both database as well as coldfusion worked fine. You
    may also please try with small example.
    Method 1:
    At database side
    select
    replace(columnname,chr(13)||chr(10),' ') as columnname
    from <tablename>
    Method 2: Coldfusion
    <cfset pageContent = reReplace(pageContent,
    chr(10)&chr(13),"", "all" )>
    I noticed that the regular expression functions in CF support
    the newline character \n Chr(10), carriage return \r Chr(13), and
    tab \t Chr(9).
    <cfsavecontent variable="data">
    here is my
    break
    </cfsavecontent>
    <cfoutput>#ReReplace(data, "\n", "<br />",
    "ALL")#</cfoutput>
    Method 3: Coldfusion.
    Please go through the below article. Example is mentioned
    http://livedocs.macromedia.com/coldfusion/6/CFML_Reference/functions-pt248.htm
    Hope this helps. Please try it out.
    Satheesh.

Maybe you are looking for

  • Excel Function to query BW using Web Services API

    Hello, I need to write an Excel function as an .XLA that will do the following: It will be invoked like any other Excel function. E.g. =GetCost(param p1, param p2) This function queries an InfoCube and must return a single numerical value for the Cel

  • MS05 transaction throws "SQL error: error during INSERT (table: &)"

    Hi Team, I am a BASIS engineer on MM system. we have a strange problem from customers we see an error on the MS05 screen with "SQL error: error during INSERT (table: &)" and when the support team runs MS01 transaciton this error gets resolved. What I

  • Syntax is undefined?

    Hi, I just try to use SunStudio to compile my program, but faces the following error. undefined               first referenced symbol                in file scanf simple_add.o ld: fatal: Symbol referencing errors. No output written to simple_add ***

  • How to add and develop eCommerce to a live BC site.

    Hi I have an exsisting live BC site http://www.alchemiststea.co.uk/ and want to continue developing it by adding ecommerce to it. I want to develope and share the site progress with the client without publishing to the live site untill development is

  • How do I transfer files on the same iMac from one user to another?

    I recently transferred files from my Macbook Pro to my iMac.  Now I have two user profiles on my iMac.  How do I transfer files from one user to the other user on the same iMac?