Forum Discussion

ionatan's avatar
ionatan
Roku Guru
12 years ago

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

3 Replies

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