Forum Discussion

HungryCoder's avatar
HungryCoder
Binge Watcher
4 years ago
Solved

Putting a newline character in a XML string

I have a contentnode with a very long description field.  I would like to break it up by placing an empty line in the middle.  I know for brightscript, this is done with chr(10).  How can I accomplish the same thing within a XML file?

  • I am a firm believer in the part of Murphy's Law that says "when you get so frustrated with a problem that you swallow your pride and ask for help, you will figure out the problem yourself 5 minutes later.  I know this to be true from personal experience.  More than once.

    In order to insert a newline character to a string in a BrightScript XML file, you do not use "\n".

    Use this: 


    
 is the character entity that represents a line break in serialized XML. "XML has no escape sequences"

1 Reply

  • I am a firm believer in the part of Murphy's Law that says "when you get so frustrated with a problem that you swallow your pride and ask for help, you will figure out the problem yourself 5 minutes later.  I know this to be true from personal experience.  More than once.

    In order to insert a newline character to a string in a BrightScript XML file, you do not use "\n".

    Use this: 


    
 is the character entity that represents a line break in serialized XML. "XML has no escape sequences"