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: 
ionatan
Level 7

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

Re: New line delimiters in xml attributes - ignored

That works. Thanks!
0 Kudos