Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
HungryCoder
Binge Watcher

Putting a newline character in a XML string

Jump to solution

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?

0 Kudos
1 Solution

Accepted Solutions
HungryCoder
Binge Watcher

Re: Putting a newline character in a XML string

Jump to solution

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"

View solution in original post

0 Kudos
1 REPLY 1
HungryCoder
Binge Watcher

Re: Putting a newline character in a XML string

Jump to solution

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"

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.