How do I write Syntax to remove blank lines? — Oracle Analytics

Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How do I write Syntax to remove blank lines?

Received Response
161
Views
8
Comments

Summary

How do I write Syntax to remove blank lines?

Content

My XML contains a line

<Text_ID2>Ready Date - Nov 23, 2016. Consign to: Company XYZ. 123 Main Dr E Industrial City, AZ 12345 Ph: 555-123-1234 Attn: Guy Smith Freight Charges prepaid to Travel NMY/No Split Bill/Door to Door Accordance with the export administration regulations. Diversion contrary to U.S. law prohibited.</Text_ID2>

When I run the .rtf, it displays as follows:

Ready Date - Nov 23, 2016.

Consign to: Company XYZ

123 Main Dr

E Industrial City, AZ 12345

Ph: 555-123-1234

Attn: Guy Smith

Freight Charges prepaid to Travel NMY/No Split Bill/Door to Door Accordance with the export administration regulations.

Diversion contrary to U.S. law prohibited.

I'd really like the text  to not have any blank lines in it and am wondering if there's a syntax to remove them.  I don't see any special characters in the XML, so wasn't sure how to remove the extra carriage returns that I can't see.

Ready Date - Nov 23, 2016.

Consign to: Company XYZ

123 Main Dr

E Industrial City, AZ 12345

Ph: 555-123-1234

Attn: Guy Smith

Freight Charges prepaid to Travel NMY/No Split Bill/Door to Door Accordance with the export administration regulations.

Diversion contrary to U.S. law prohibited.

Thank you for your time.

Answers

  • TRACY HENGST
    TRACY HENGST Rank 4 - Community Specialist

    I attached to original post.  Thanks!

  • Venkat Thota - BIP
    Venkat Thota - BIP Rank 7 - Analytics Coach

    can you able to send template and xml?

  • Venkat Thota - BIP
    Venkat Thota - BIP Rank 7 - Analytics Coach

    what is the output you are expecting? Thanks

  • TRACY HENGST
    TRACY HENGST Rank 4 - Community Specialist

    I just updated my original posting (the formatting showed up strange on it).  This however is what I'd like it to look like.  Basically just removing any double carriage returns.

    Ready Date - Nov 23, 2016.

    Consign to: Company XYZ

    123 Main Dr

    E Industrial City, AZ 12345

    Ph: 555-123-1234

    Attn: Guy Smith

    Freight Charges prepaid to Travel NMY/No Split Bill/Door to Door Accordance with the export administration regulations.

    Diversion contrary to U.S. law prohibited.

  • TRACY HENGST
    TRACY HENGST Rank 4 - Community Specialist

    The text in the XML is coming from the Media Object in JDE.  We have the Media Object broken down in to bracketed sections and JDE pulls 1 of the bracketed sections to show up on the XML.  So I don't have the ability to break apart and bring each line in as separate field.

    My goal is to make neutral all the text that is typed in by our users.  1 of the things I'd like to do to make the text consistent is to remove all the extra blank lines.

    I can do this by asking the users to update 1000's upon 1000's of text entries.  OR, put some coding into the UBE to strip out double carriage returns.  OR, write some kind of syntax in the .rtf to remove the blank lines.

    I hope that I'm explaining this the right way.  Thanks for your input.

  • Venkat Thota - BIP
    Venkat Thota - BIP Rank 7 - Analytics Coach

    are you concatenating all separate fields into single filed to get below information ,

    Ready Date - Nov 23, 2016.

    Consign to: Company XYZ

    123 Main Dr

    E Industrial City, AZ 12345

    Ph: 555-123-1234

    Attn: Guy Smith

    Freight Charges prepaid to Travel NMY/No Split Bill/Door to Door Accordance with the export administration regulations.

    Diversion contrary to U.S. law prohibited.

    seems like you are adding all into one at source level to get complete data as description, if yes ,then keep all as separate fields and directly import one down other in rtf template.Thanks

  • YGUTTIKONDA
    YGUTTIKONDA Rank 6 - Analytics Lead

    Hello,

    Just checked your data file and it has the line breaks .. so a better way to handle this would be break the data elements into multiple each line as one data element .. this would give you more control on formatting ...

    Hope this helps..

    --YG

  • Vani-R
    Vani-R Rank 4 - Community Specialist

    Please use <?xdofx:replace(Text_2_GV_ID2,chr(10),' ')?> in RTF, for replacing newline with space.

    But, now it removes even other newlines. Please alter accordingly.