Jump to content

How to parse RSS?


Recommended Posts

Hi,

Does anyone know if it'll be possible to parse a RSS 2 document so it's formatted in a GUI window?

So far I can grab the RSS and place it in a string - not sure how to format it though... even converting it to HTML would be fine (probably to only real solution).

Any help however small would be great.

Thanks,

Stuart

Link to comment
Share on other sites

Hi,

Does anyone know if it'll be possible to parse a RSS 2 document so it's formatted in a GUI window?

So far I can grab the RSS and place it in a string - not sure how to format it though... even converting it to HTML would be fine (probably to only real solution).

Any help however small would be great.

Thanks,

Stuart

<{POST_SNAPBACK}>

Dont have to HTML it

Just parse the links out, trow them in a listbox and use a button to launch the selected link with this function i found in the forum:

Func _GoToWebPage($URL)
    Run(@comspec & ' /c START "" "' & $URL & '"', @SystemDir, @SW_HIDE)
EndFunc.
Edited by TuMbLeWeEd
Link to comment
Share on other sites

Dont have to HTML it

Just parse the links out, trow them in a listbox and use a button to launch the selected link with this function i found in the forum:

Func _GoToWebPage($URL)
    Run(@comspec & ' /c START "" "' & $URL & '"', @SystemDir, @SW_HIDE)
EndFunc.

<{POST_SNAPBACK}>

Thanks TuMbLeWeEd,

I have similiar code already in my GUI for links - but the part I cant seem to do is the parsing of the RSS - I know regular expressions a little, but not sure how or if I can use them with AutoIT.

Any ideas on how to extract the URL and Title from a RSS file?

Link to comment
Share on other sites

Thanks TuMbLeWeEd,

I have similiar code already in my GUI for links - but the part I cant seem to do is the parsing of the RSS - I know regular expressions a little, but not sure how or if I can use them with AutoIT.

Any ideas on how to extract the URL and Title from a RSS file?

<{POST_SNAPBACK}>

Dont know shit about regexp, so i give you somthing i have used:

$file = "rss.xml"
$text = Fileread($file,filegetsize($file))
$teller = 0
Do
    $nr1 = StringInStr($text,'<guid isPermaLink="false">')
    $text = stringmid($text,$nr1 + 26)
    $nr = stringinstr($text,'</guid>')
    if $nr1 then ConsoleWrite("link = " & StringMid($text,1,$nr-1) & @LF)
    $text = stringmid($text,$nr + 7)
Until $nr1 = 0
Exit

Think regexp is better, sinds i never used it i dont realy know

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...