Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
HungryCoder
Level 8

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
Level 8

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
Level 8

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