Parsing RSS feeds without COM

Started by MrBcx, September 20, 2020, 11:01:06 AM

Previous topic - Next topic

MrBcx

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

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.
-Quin.
GitHub

MrBcx

Quote from: Quin 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.

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

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


Quin

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...
-Quin.
GitHub

MrBcx

Quote from: Quin 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...

FYI

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

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