Author Topic: Parsing RSS feeds without COM  (Read 1831 times)

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2538
    • View Profile
Parsing RSS feeds without COM
« on: September 20, 2020, 11:01:06 AM »
I recently uploaded a News Headline Ticker.   That app uses the MS scripting (COM) based XML parsing engine that is remarkably SLOW. 

I became interested in what it would take to roll my own RSS feed parser, so that's what I did.  The attached file contains very little code in the form of a small but instructive demo, along with just two SUBS  that performs the magic.

This is NOT a generic XML parser -- that would be a lot of work.  My code is a FAST hack at fetching the relevant tags
from an RSS xml file.  The demo includes a number of different feeds that you can try out.

I can't imagine there's much of a need for something like this but it was an interesting enough challenge that I thought I would share it.

Tinker away ... !

Quin

  • Sr. Member
  • ****
  • Posts: 299
    • View Profile
    • Quin's site
Re: Parsing RSS feeds without COM
« Reply #1 on: July 31, 2024, 12:25:08 PM »
Very nice!
I wonder how possible it would be to intigrate a proper XML parser, like https://github.com/libexpat/libexpat
It's pretty light, seems to be mostly C with a little bit of C++. PureBasic uses it and it's super fast.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2538
    • View Profile
Re: Parsing RSS feeds without COM
« Reply #2 on: July 31, 2024, 01:45:57 PM »
Very nice!
I wonder how possible it would be to intigrate a proper XML parser, like https://github.com/libexpat/libexpat
It's pretty light, seems to be mostly C with a little bit of C++. PureBasic uses it and it's super fast.

If you mean integrate expat into the demo, go for it. 

If you mean integrate expat into BCX, that's not gonna happen.


Quin

  • Sr. Member
  • ****
  • Posts: 299
    • View Profile
    • Quin's site
Re: Parsing RSS feeds without COM
« Reply #3 on: July 31, 2024, 02:04:32 PM »
Haha, yes I meant into the demo :D
I haven't used C libraries with BCX too much, but I imagine it's far better than using C libraries from languages that compile directly, don't just translate. Tinkering time...

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2538
    • View Profile
Re: Parsing RSS feeds without COM
« Reply #4 on: July 31, 2024, 02:39:38 PM »
Haha, yes I meant into the demo :D
I haven't used C libraries with BCX too much, but I imagine it's far better than using C libraries from languages that compile directly, don't just translate. Tinkering time...

FYI

Here is my scrolling google news ticker mentioned in the opening post:

https://bcxbasiccoders.com/smf/index.php?topic=316.msg1345#msg1345