Carriage Returns & Line Feeds in XML documents

Does anyone know why the PL/SQL XML parser will NOT work with Carriage Returns (0x0D) within the XML document?
Currently I'm having to strip them out, leaving just the Line Feed (0x0A).
I only realised this after looking at the family.xml example document.
T.I.A.
Geoff

I forgot to mention that I'm running Oracle 8i on Windows NT.

Similar Messages

  • 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

  • What is escape character for for Carriage Return, Line Feed, Form Feed

    Hi
    I need to a text file which should have following characters
    Carriage Return, Line Feed, Form Feed
    How do i insert them in a string
    i know "\f" is carriage return,
    but what are characters for line feed and form feed
    Ashish

    uncle_alice wrote:
    jverd wrote:
    remus.dragos wrote:
    I forgot that it does not exist in Java. A good thing
    from my point of view.Running the following makes my computer beep.
    public class Bell {
    public static void main(String... args) {
    System.out.println("\u0007");
    Sure, sending a BEL character to the console rings the bell, but that has nothing to do with Java. Anyway, I think he meant Java doesn't support the \a escape sequence in string and char literals.
    >
    >
    >I forgot that it does not exist in Java. A good thing
    from my point of view.
    Running the following makes my computer beep.
    public class Bell {
    public static void main(String... args) {
    System.out.println("\u0007");
    } Sure, sending a BEL character to the console rings the bell, but that has nothing to do with Java. Anyway, I think he meant Java doesn't support the \a escape sequence in string and char literals.
    Ah, I thought he was saying Java doesn't support ringing the bell.

  • 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

  • Carriage Returns, Line Feeds, and Tabs in Text Area

    I am having users copy and paste data from an Excel spreadsheet into a textarea on a BSP page.  When they submit this, since there are tabs and line feeds in the data, the BSP does not recognize the data.  The value in the field comes through as blank. When I manually type something into this field, with out any carriage returns, tabs, etc., the value does not come through as blank?  Does anybody know how to get around this?

    HI
    Iam uploading the data from application server(AL11) to other server.
    In the GLPCA-SGTXT(Table) iam having some text like 'This is good ##'.i was downloded some other data with this text('This is good ##') by using report program in to aplicationserver(AL11) and from there iam uploading that data into other server.
    But here the problem is in the UNIX, it was showing some problem.
    That is actually it need to show the format like:
    001 256 786 This is good## 459786
    But here it was showing like:
    001 256 786 This is good^M
    459786
    So here '459786' is coming to next line. But i need this '459786' also in the same line.
    I am not sure if it is possible to remove CR and LF's using the code the program is written in, but that is what we need to do.   In Unix  ^M is the CR (Carriage return), but I am not sure what LF is?

  • How to insert a carriage return/line feed in a TextEdit without using wrap

    Hi,
    The string that I want to pass to the textedit is
    "Order Notes : bla bla bla
    Shipping notes : bla bla bla"
    The length of Order notes and shipping notes can vary.
    I am using wrapping. But I need to insert a line feed just before Shipping Notes so it comes on a different line inside the textedit box.
    How do I achieve this?
    Thanks in advance,
    Sachin

    Good thinking, Craig
    I didn't think of this large textarea being present there, just waiting for a question like this ...
    To sum it up for the lazy ones (cause looking at the examples is always worth it, so go do as Craig told ya g!):
    CONCATENATE
    `Order Notes : bla bla bla`
    `Shipping notes : bla bla bla`
    INTO text SEPARATED BY cl_abap_char_utilities=>cr_lf.

  • Need help on carriage return / line feed...

    Hi,
    I have a variable defined for a new line, e.g. <CFSET
    NewLine = "#chr(13)##chr(10)#">, that I use as a break between
    lines of text within CFMAIL.
    <CFSET Message = NewLine & "Product Name: " &
    Trim(GetProduct.ProductName) & NewLine>
    <CFSET Message = Message & "Product Description: "
    & Trim(GetProduct.ProductDesc) & NewLine>
    <CFSET Message = Message & "Product Color: " &
    Trim(GetProduct.ProductColor) & NewLine>
    <CFMAIL FROM="[email protected]"
    TO="[email protected]" SUBJECT="Product
    Info">#Message#</CFMAIL>
    If the email is sent to and open up in Microsoft Outlook
    account (mailbox), the "Product Description" line of text would
    stay on the same line as the Product Name (when
    LEN(GetProduct.ProductName) > 50). In other words, the NewLine
    variable is not doing the break. The code works with yahoo or
    hotmail account though.
    Any advice is greatly appreciated.
    Thanks in advance!

    The trick is to add 3 blank spaces (" " ) at the end of each
    line but before the break (NewLine) such as these:
    <CFSET NewLine = "#chr(13)##chr(10)#">
    <CFSET Message = NewLine & "Product Name: " &
    Trim(GetProduct.ProductName) & " " & NewLine>
    <CFSET Message = Message & "Product Description: "
    & Trim(GetProduct.ProductDesc) & " " & NewLine>
    <CFSET Message = Message & "Product Color: " &
    Trim(GetProduct.ProductColor) & NewLine>
    <CFMAIL FROM="[email protected]"
    TO="[email protected]" SUBJECT="Product
    Info">#Message#</CFMAIL>

  • How to insert a Carriage Return + Line Feed inside a TextView UI element ?

    Hello All,
      Does anyone know how can I achieve the above scenario ? I have a string variable that collects and appeneds text messages from various BAPI calls. At the end of the process, the contents of this variable will be mapped to a textview. Problem is, the length of the string collected is way too long and hence not very readable.  I am not able to find a way to introduce a CRLF after each message is read and appended. Can anyone advise ? Thank you.
    from
    Kwok Wei

    Hi Renjith,
      So far I manage to get find a walk-around to the problem by using the TextEdit as what you have suggested. This works fine... till when you try to print it out. As you see, during printing, I need to remove the vertical scrollbar and ensure that all the text are properly displayed and I do not see any visibleFooter = false option (similar to that of a table) available to the TextEdit.
      If anyone has any suggestions or a more feasible walk around that allows me to print the entire contents in the TextEdit, that will be greatly appreciated
    from
    Kwok Wei

  • Carriage Returns and Tabs in XML element

    I have a number of carriage returns and tabs within an xml element. When I take that element I would like it to transform to html in which I am then displaying within a JEditorPane. However, when I do this it is one long string. I have tried the xml:space="preserve" within that element and this still is not working.
    Here is part of the xml with the carriage return line feeds. The element that I am talking about is called pseudocode. You can see it is displayed correctly below.
    Design Document XML : <?xml version="1.0" encoding="ISO-8859-1"?><design-doc><title-page><title>Testing Document</title><class-prepared-for>Lloyd</class-prepared-for><authors>Ben Garbers</authors><date-created>September 23, 2004</date-created></title-page><introduction text="This is the introduction. This is the introduction."/><class-definitions><class-definition class-name="ClassOne" visibility="public" class-complexity="not complex"><global-variables><variable visibility="public" name="VariableOne" object="String" comments="This is a String."/><variable visibility="public" name="VariableTwo" object="Integer" comments="This is an Integer."/></global-variables><methods><method name="MethodOne" synopsis="This will do some things." purpose="public" visibility="public"><input-parms><variable visibility="null" name="firstName" object="String" comments="null"/></input-parms><output-parms><variable visibility="null" name="lastName" object="String" comments="null"/></output-parms><local-variables><variable visibility="null" name="age" object="int" comments="null"/></local-variables><pseudocode xml:space="preserve">/* Ensure that player name exist in the system*/
    if (player =null)
         NullPlayerException;
              if (NOT (isPlayerNameExist(player)))
                   throw PlayerNameNotExistException;
              /* Ensure player name exist in the team already*/
              i ? 1;
              while (i <= length(mPlayers)) {
                   if (mPlayers.mPlayerName != playerName)
                        throw PlayerNameNotExistInTeamException;
    this.mPlayers ? this.mPlayers - player;</pseudocode>
    However, when I do the transformation I get the following with the pseudocode:
    /* Ensure that player name exist in the system*/if (player =null)     NullPlayerException;          if (NOT (isPlayerNameExist(player)))               throw PlayerNameNotExistException;          /* Ensure player name exist in the team already*/          i ? 1;          while (i <= length(mPlayers)) {               if (mPlayers[i].mPlayerName != playerName)                    throw PlayerNameNotExistInTeamException;}this.mPlayers ? this.mPlayers - player;
    It looks like it adds some spaces but no carriage returns or line feeds.
    My transformation code is the following:
         public ParseFile(String xmlString) {
              try {
              //Here we will load the correct style sheet for the message
              //that will be formatted.
              String urlString = "DesignDocument.xsl";
              URL url = this.getClass().getResource(urlString);
              System.out.println("URL to style sheet = " + url.toString());
              String styleSheetName = url.getFile();
              System.out.println("Style sheet name : " + styleSheetName);
              InputStream styleSheetInputStream = this.getClass().getResourceAsStream(urlString);
              //We will than load our SAXParerFactory and parse the message.
              SAXParserFactory SPFactory = SAXParserFactory.newInstance();
              SPFactory.setValidating(true);
              SAXParser sp = SPFactory.newSAXParser();
              XMLReader sax2parser = sp.getXMLReader();
              //NO Validation done on for this because we do NOT have a DTD.
              sax2parser.setFeature(
                   "http://xml.org/sax/features/validation",
                   false);
              sax2parser.setContentHandler(new FileContentHandler());
              //we create a character array of the length of the xml message String
              char[] messageCharacterArray =
                   new char[xmlString.length()];
              // we then put the xml string into the character array.
              messageCharacterArray = xmlString.toCharArray();
              // after this ew end up creating a CharArrayReader that will be used by the Sax
              // parser to parse the xml.
              CharArrayReader xmlCharArrayReader =
                   new CharArrayReader(messageCharacterArray);
              // we put the xml character array within the Input Source which will then be parsed
              // by the Sax2 parser.
              InputSource in = new InputSource(xmlCharArrayReader);
              // Use a Transformer for outputting the message into our formatted xml using
              // the stylesheet defined up in a messages own sxl stylesheet file.
              TransformerFactory tFactory = TransformerFactory.newInstance();
              tFactory.setURIResolver(new BasicURIResolver());
              StreamSource stylesource = new StreamSource(styleSheetInputStream);
              Transformer transformer = tFactory.newTransformer(stylesource);
    //          transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    //          transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    //          Properties properties = new Properties();
    //          properties.setProperty("indent", "yes");
    //          properties.setProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    //          transformer.setOutputProperties(properties);
              // We will use a ByteArrayOutputStream to put our transformed xml.
              ByteArrayOutputStream bos = new ByteArrayOutputStream();
              StreamResult result = new StreamResult(bos);
              SAXSource source = new SAXSource(in);
              transformer.transform(source, result);
              String s = bos.toString();
              StringBuffer sb = new StringBuffer();
              //This will make sure the Version Line is not shown.
              BufferedReader br = new BufferedReader(new StringReader(s));
              String line = "";
              while ((line = br.readLine()) != null) {
                        sb.append(line);
              bos.close();
              br.close();
              formattedXmlString = sb.toString();
              System.out.println("--------------------------------");
              System.out.println(formattedXmlString);
              System.out.println("--------------------------------");
              } catch (Exception e) {
                   e.printStackTrace();
    I have been searching and trying to figure this out forever. Any help would be greatly appreciated. Bottom line is that I want carriage returns and tabs to work when transferring from the xml to xsl.

    I get the following line when adding the <pre> tags.
    /* Ensure that player name exist in the system*/if (player =null)     NullPlayerException;          if (NOT (isPlayerNameExist(player)))               throw PlayerNameNotExistException;          /* Ensure player name exist in the team already*/          i ? 1;          while (i <= length(mPlayers)) {               if (mPlayers[i].mPlayerName != playerName)                    throw PlayerNameNotExistInTeamException;}this.mPlayers ? this.mPlayers - player;
    On the screen this is shown on 1 line. It looks like the tabs are working correctly. However, the carriage return, line feeds do not seem to be working. The xml that is pushed into the transformation has the carriage returns and line feeds and is formatted correctly. There has to be something happening when the xsl takes the xml String. When I add <BR></BR> within the xml that doesn't seem to work either.
    I am really sumpted. If you could help DrClap I would really be appreciated.

  • Losing Line-feed in XML parsing (XMLTRANSFORM) or File output (clob2file)?

    Hi all, need some help please!
    I'm using a xslt file to transferm a XML file into a txt format file. Within the XSLT file, there is a carriage-return (<xsl:text>
    </xsl:text>) (it disappeared already, here is what i'm using "#xD" or "#xA", have to take the '&' and ';' away), but the final output txt file seems to lose this carriage-return/line-feed information. The output data became one-line.
    Here are the steps I've used:
    1. lv_xml_data = XMLTRANSFORM (a.xml_data, b.f_xslt)
    => output data into XMLTYPE;
    2. using XMLTYPE.getclobval to get the output data into CLOB format.
    lv_output_clob := XMLTYPE.getclobval (lv_xml_data);
    3. using encoding:
    lv_output_clob :=
    DBMS_XMLGEN.CONVERT (lv_output_clob, DBMS_XMLGEN.entity_decode);
    4. using clob2file write to a file with txt format.
    DBMS_XSLPROCESSOR.clob2file (lv_output_clob,
    lv_output_dir,
    lv_filename,
    NLS_CHARSET_ID ('UTF8')
    Been struggling with these a few days already. Any help is appreciated. I would really like to get some input to see what might cause the carriage-return/line-feed characters lost.
    Thanks in advance!
    -Jane
    Edited by: user9084567 on Feb 1, 2010 1:45 PM
    Edited by: user9084567 on Feb 1, 2010 1:47 PM
    Edited by: user9084567 on Feb 1, 2010 1:48 PM

    A_non,
    After a few testing, I can identify the CRLF was lost in XMLTRANSFORM. I had read your other thread related to this, and try to run this sample code:
    /* Formatted on 2010/02/03 15:32 (Formatter Plus v4.8.8) */
    DECLARE --Local variables here
    v_xml XMLTYPE
    := XMLTYPE
    ('<
    offers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd.xsd"><
    submit type="DAM" date="2007-03-28" name="MKTPART1" mode="NORMAL"/><
    offer name="Jamestown" flag="true" version_no="1.0"><
    standing date="2007-03-29" type="WED"/><
    identifier external_id="523736560"/><
    /offer><
    /offers>'
    v_xslt XMLTYPE
    := XMLTYPE
    ('<
    xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <
    xsl:output method="text"/> <
    xsl:variable name="new_line" select="''&#xA;''" /> <
    xsl:template match="/"> <
    xsl:value-of select="/offers/offer/...name"/><
    xsl:value-of select="$new_line" /><
    xsl:value-of select="/offers/submit/...date"/><
    xsl:value-of select="$new_line" /><
    xsl:value-of select="/offers/offer/standing/...date"/><
    xsl:value-of select="$new_line" /><
    xsl:value-of select="/offers/offer/standing/...type"/><
    xsl:value-of select="$new_line" /><
    /xsl:template><
    /xsl:stylesheet>'
    BEGIN -- Test statements here
    DBMS_OUTPUT.put_line (XMLTYPE.transform (v_xml, v_xslt).getstringval ());
    END;
    But come out these error:
    Error at line 2
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00230: invalid character 10 (U+000A) found in a Name or Nmtoken
    Error at line 4
    ORA-06512: at "SYS.XMLTYPE", line 310
    ORA-06512: at line 2
    Can not figure out why. Try to use this <xsl:variable name="new_line" select="''& # x A ;''" /> inside my style sheet, but it seems not taking it. Not too sure what's exactly should be the quotes for "''& # x A ;''" (w/o space). If I used doub quote + two single quotes, it returns error, LPX-00601: Invalid token in: ' '; if I used single quote + double quote, it did not bring in CRLF at all.
    Any input?
    Thanks in advance.

  • Carriage Returns / Line Breaks & PDF

    I have a requirement to display a customers address in 1 column of a PDF report.
    The address is stored in the RPD as Address1, Address2, etc. etc.
    I use the answer of the question "Carriage Returns / Line Breaks" as a basic startup.
    ( Question Registered the 02/24/10 from user12673225 )
    I get a great result in the HTML report.
    But, when I print the report in PDF the HTML control codes appear in the PDF report.
    e.g.
    LTHEA A | P.O. BOX 877 *<br* | KY | VERNON A 100000479 |
    VERNON | /> GRAND...........|....|.............................|
    ...........| CAYMAN.............|....|.............................|
    ...........| KY1-1103 *<br*......|....|.............................|
    ...........| /> CAYMAN.........|....|.............................|
    ...........| ISLANDS.............|....|.............................|
    Presently I generate the report in HTML then I convert it in PDF format.
    Is there a way to print the report directly in PDF without the html control appearing in clear in the pdf file. Is is possible to do the job in one step only?
    Edited by: user9214078 on Feb 24, 2010 11:42 AM

    Hi Will,
    The [   instead of   <  does not work.
    The character "[" is not recognized as an HTLM control code.
    It worth the try.
    Thanks
    Gilles.

  • Getting line number of  XML document

    Hi all,
    Can someone please help me in 'how to get the line number of XML document'. I know when it throws SAXParseException it give the line number. I want to get the line number when it parses the document successfully. I know i need to use setDocumentLocator and then implement the Locator.
    can someone give me a chunk of code for it.
    thx in advance,
    -Soni

    Hi,
    Atlast i got the solution. It goes like this..
    class A {
    Location loc;
    public void setDocumentLocator(Locator l) {
    loc = l;
    //Here goes other methods like startElement, endElement etc.
    public void someMethod() {
    loc.getLineNumber(); //u can do this anywhere inside the class
    -Soni

  • Hard Carriage Returns on Paragraph and XML

    Hi,
    I'm still running FM 7.2, I have 8.0, but we are not ready as a company to move yet.
    I am capturing legacy FM information and need to save as XML.
    This information will at times have paragraphs that used hard carriage returns to build in separation and make things easier to read.
    When we export this XML, these hard CRs are removed and all extra white space is compressed out of the element.
    This is causing much grief for the people reading the documents and they have asked if I can retain the hard breaks.
    I've looked into the Structured Application and found nothing. I've looked at the ReadWrite Rules files in hopes I could map the hard break to a element of some kind, or something like that. I'm not finding any solutions.
    Is there a way to keep this information in the resulting XML file?
    Thanks,
    - mike

    Hello Mr. Hare,
    you might try the following:
    1. Adjust the template of your structapp to contain a variable named "hardreturn" whose definition is "\n" (without the quotiation marks).
    2. In your R/W-Rules, write: entity "hardreturn"is fm char 0x09;
    3. In every FM-Document you want to save as XML
    a. also add the variable
    b. assign the structapp
    4. ..and do the following
    a. insert the variable "hardreturn" somewhere and copy it into the clipboard, and delete the variable from your insertion point
    b. Search for "\p\p" (=two consecutive hard returns, i.e. an "empty line" or for "\x09" (= a soft return) and "change" "by pasting".
    The result should be a variable "hardreturn, wherever \p\p or \x09 was.
    If you save this as XML, the \x09 from the variable should survive as an entity.
    Hope this helps.
    With kind regards,
    Franz.
    [ excess signature removed by host ]

  • Carriage return in feed item description?

    As the title says, is it possible to use carriage returns in a podcast feed item description? I'd like my description to list the show topics... something like:
    Show topics:
    1. Topic 1
    2. Topic 2
    Possible? I'm currently using Podcast Maker to generate my feeds. Does that make it any easier or more difficult?
    Aaron

    You can just put a newline character inside the description field and iTunes will show the newline in the Podcast Information Panel (click the "i" button for the episode to see this panel).
    You shouldn't just put a <BR> tag in there though. If you want to put any kind of html tag in the description field, you must either escape them with a &lt; and &gt; tags or
    with a <![CDATA[ ]]>.
    So some field results I found out through experimentation with iTunes:
    First what works:
    - Newline characters work.
    - <BR> works.
    - <![CDATA[line 1<BR>line 2]]> works too.
    What doesn't work:
    - <BR>
    - <BR/> and its escaped forms such as &lt;BR/&gt;
    I'm not sure how other podcast clients will treat the newline character though.
    - Andy Kim
    Potion Factory

  • How do i add a newline or carriage return to make my xml file look pretty?

    Hi guys
    I'm writing an xml file with jsp, the problem is, it writes it in one big chunk of text. e.g.
    <start>hello, my name is joe</start><middle>I like trees</middle><end>boo</end>
    Now what I want to do is present this xml file in a decent manner,
    e.g.
    <start>hello my name is joe</start>
    <middle>i like trees</middle>
    <end>boo</end>
    i've tried
    xmlFile = "<start>Hello my name is joe</start>"+\n\r;
    and
    xmlFile ="<start>Hello my name is joe</start>"+"\n\r";
    neither work, can anyone provide me with some insight into how I can add a carriage return / new line to make my xml file look pretty?
    Many thanks for any responses!

    u r right <BR> tag will not work...
    I wrote following code to generate xml file and it works fine...U can try the same...
    try
    FileOutputStream fos = new FileOutputStream("c:\\temp.xml");
    String xmlString = "<root>\n<start>Hello my name is joe</start>"+"\n";
    xmlString = xmlString +"<middle>blah blah</middle>\n</root>";
    fos.write(xmlString.getBytes());
    fos.close();
    fos = null;
    catch(Exception e)
    e.printStackTrace();
    }

Maybe you are looking for

  • HP Pavilion dv6-6b47dx gets "Restoration Incomplete" from Recovery Manager.

    I got my son's older HP Laptop, and decided to restore it before using it for myself.  Previously it was working OK.  An HP Pavilion dv6-6b47dx gets "Restoration Incomplete" from the Recovery Manager.  I have tried running the recovery manager from b

  • Price in Info Record

    Hi I would need to enter Gross Price in info record using three decimals. As it is now I'm only able to use two. Where can I change this? / Henrik

  • Strange device permanently logged into my account ...

    Hi, Question: Is there a temporary file on the server in my skype accout? I mean, an obsolete file that should have been deleted at the end of one of the skype sessions? And if yes, then is this file causing me problems calling certain overseas numbe

  • Can't open documents - File select screen just flashes and then disappears

    In Adobe Creative Suite 3 Design Standard - When I open Photoshop, Illustrator, etc. and then try to open a document from one of these programs, the screen where you would select the file to open just flashes and then disappears. This locks me out of

  • Messed up initial set-up MobileMe to iCloud

    Dear all, last night (very late) I tried to migrate MobileMe to iCloud on a Window PC with Outlook 2010. I've got an old Apple id for buying Music and Apps and an existing [email protected] MobileMe acccount for syncing Outlook calendar and mail. I messed u