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: 
ionatan
Roku Guru

New line delimiters in xml attributes - ignored

It seems that new lines chars (chr10) from xml attributes are ignored when xml feeds are parsed.
Is it possible to read also these line delimiters from xml attributes?
0 Kudos
2 REPLIES 2
RokuChris
Roku Employee
Roku Employee

Re: New line delimiters in xml attributes - ignored

As I understand it, putting an actual newline character in an attribute value is not compliant with the XML spec and most parsers will normalize it into a single space. I don't know what tool you're using to generate your XML, but be sure it is encoding the character correctly:

<element attribute="First line&#10;Second line&#10;Third line..." />
0 Kudos
ionatan
Roku Guru

Re: New line delimiters in xml attributes - ignored

That works. Thanks!
0 Kudos