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

Parse HTML tags

Is there any function which can be used to parse HTML tags (<a> or <img>)?!
I need to parse a HTML image banner code to get the path to the image and tracking code for it.

Thanks
0 Kudos
3 REPLIES 3
RokuJoel
Binge Watcher

Re: Parse HTML tags

You can use roRegex and string functions like Mid(), instr(), left() and right() to do it if you have no other choice. Problem is if the website changes ever so slightly it may break your parser.

- Joel
0 Kudos
EnTerr
Roku Guru

Re: Parse HTML tags

Can't the XML functions in B/S be used for that? With some luck html might be parseable like XML, no?
0 Kudos
RokuJoel
Binge Watcher

Re: Parse HTML tags

Luck being the operative word there.

True, some html can be parseable as XML, but it is pretty rare to find it, especially when you really need it, and if you do, at the very least you may need to rewrite the header line so the device doesn't reject it as "not xml".

-Joel
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.