<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:access="http://www.bloglines.com/about/specs/fac-1.0">
  <access:restriction relationship="allow" />
  <channel>
    <title>Wikispaces : Liberty BASIC Community Wiki - items matching description</title>
    <link>https://basic.wikispaces.com/space/view</link>
    <description>Filtered items at Wikispaces : Liberty BASIC Community Wiki</description>
    
    <webMaster>help@wikispaces.com (Wikispaces)</webMaster>
    <generator>https://www.wikispaces.com/</generator>
    <ttl>60</ttl>
    <atom:link href="https://basic.wikispaces.com/space/xmlo?v=rss_2_0" rel="self" type="application/rss+xml" />
    <image>
      <title>Wikispaces : Liberty BASIC Community Wiki - items matching description</title>
      <url>https://www.wikispaces.com/i/l.png</url>
      <link>https://basic.wikispaces.com/space/view</link>
      <width>140</width>
      <height>48</height>
      <description>Wikispaces</description>
    </image>

    <item>
      <title>Rss Parser in Liberty Basic</title>
      <link>https://basic.wikispaces.com/Rss+Parser+in+Liberty+Basic</link>
      <dc:creator>Alyce</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/Rss+Parser+in+Liberty+Basic</guid>
      <comments>https://basic.wikispaces.com/page/messages/Rss+Parser+in+Liberty+Basic</comments>
      <pubDate>Thu, 08 Mar 2012 14:03:46 GMT</pubDate>
      <description>Welcome to my tiny Rss parser...I&#039;m trying to create a small rss reader in liberty basic...I don&#039;t have any scientific background about programming, but little bit of little bit of that, i&#039;m enjoying my time to write small applications in Liberty Basic (or other basics, but i find liberty basic really basic about GUI applications, is it only me?). Well as i&#039;m writing the code, i&#039;m trying to purify it as much as i can...The code i provide here is able strip most rss tags and print to mainwin...I&#039;ll change it by time, to get adapted for a GUI, so i need to place parsed elements to some string variable with index...I hope this will work for all...&lt;br /&gt;
&lt;hr /&gt;
See the first part for the URL,receive code from &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://alycesrestaurant.com/&quot; rel=&quot;nofollow&quot;&gt;Alycesrestaurant.com&lt;/a&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;lb&amp;quot;&amp;gt;GLOBAL rss$&amp;lt;br/&amp;gt;url$=&amp;amp;quot;http://rss.cnn.com/rss/cnn_topstories.rss&amp;amp;quot;&amp;lt;br/&amp;gt;localfile$=&amp;amp;quot;rss.xml&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;a=geturl(url$,localfile$)&amp;lt;br/&amp;gt;a= StripTags(rss$)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Function geturl(url$,localfile$)&amp;lt;br/&amp;gt;uniUrl$ = MultiByteToWideChar$(url$)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;if uniUrl$ = &amp;amp;quot;&amp;amp;quot; then&amp;lt;br/&amp;gt;    print &amp;amp;quot;Unable to convert URL to unicode string.&amp;amp;quot;&amp;lt;br/&amp;gt;    end&amp;lt;br/&amp;gt;end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;if result = 0, URL is valid&amp;lt;br/&amp;gt;result = ValidURL(uniUrl$)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;if result = 0 then&amp;lt;br/&amp;gt;    &#039;download html from url&amp;lt;br/&amp;gt;    Cursor Hourglass&amp;lt;br/&amp;gt;    downloadresult = DownloadToFile(url$,localfile$)&amp;lt;br/&amp;gt;    if downloadresult &amp;amp;lt;&amp;amp;gt; 0 then print &amp;amp;quot;Error downloading &amp;amp;quot;;url$&amp;lt;br/&amp;gt;    Cursor Normal&amp;lt;br/&amp;gt;else&amp;lt;br/&amp;gt;    print &amp;amp;quot;Invalid URL:&amp;amp;quot;; url$&amp;lt;br/&amp;gt;end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;Now opening the rss file, and binding to local var...&amp;lt;br/&amp;gt;&#039;Will be array for future multiple rss...&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;open  localfile$ for input as #f&amp;lt;br/&amp;gt;    rss$=input$ (#f, lof(#f))&amp;lt;br/&amp;gt;close #f&amp;lt;br/&amp;gt;End Function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function StripTags(raw$)&amp;lt;br/&amp;gt;&#039;print only the tags starting with &amp;amp;lt; and ending with &amp;amp;gt;&amp;lt;br/&amp;gt;&#039;According to RSS 2.0 standart we have the following channel data..&amp;lt;br/&amp;gt;&#039;First, start with rss or xml declaration, version...Then&amp;lt;br/&amp;gt;&#039;Channel&amp;lt;br/&amp;gt;&#039;       |-Title       Required&amp;lt;br/&amp;gt;&#039;       |-Link        Required&amp;lt;br/&amp;gt;&#039;       |-Description Required&amp;lt;br/&amp;gt;&#039;&amp;lt;br/&amp;gt;&#039;       |-Language         Optional&amp;lt;br/&amp;gt;&#039;       |-Copyright        Optional&amp;lt;br/&amp;gt;&#039;       |-managingEditor   Optional&amp;lt;br/&amp;gt;&#039;       |-webMaster        Optional&amp;lt;br/&amp;gt;&#039;       |-pubDate          Optional&amp;lt;br/&amp;gt;&#039;       |-lastBuildDate    Optional&amp;lt;br/&amp;gt;&#039;       |-category         Optional&amp;lt;br/&amp;gt;&#039;       |-generator        Optional&amp;lt;br/&amp;gt;&#039;       |-docs             Optional&amp;lt;br/&amp;gt;&#039;       |-cloud            Optional&amp;lt;br/&amp;gt;&#039;       |-ttl              Optional&amp;lt;br/&amp;gt;&#039;       |-image            Optional&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;-&amp;lt;br/&amp;gt;&#039;       |-rating           Optional                                             |&amp;amp;gt;&amp;amp;lt;url&amp;amp;gt;&amp;amp;lt;/url&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;       |-textInput        Optional                                             |&amp;amp;lt;title&amp;amp;gt;&amp;amp;lt;/title&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;       |-skipHours        Optional                                             |&amp;amp;lt;link&amp;amp;gt;&amp;amp;lt;/link&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;       |-skipDays         Optional                                             |&amp;amp;lt;width&amp;amp;gt;&amp;amp;lt;/width&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;                                                                               |&amp;amp;lt;height&amp;amp;gt;&amp;amp;lt;/height&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;                                                                               |&amp;amp;lt;description&amp;amp;gt;&amp;amp;lt;/description&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;&amp;lt;br/&amp;gt;&#039;&amp;lt;br/&amp;gt;&#039;&amp;lt;br/&amp;gt;&#039;&amp;lt;br/&amp;gt;&#039;&amp;lt;br/&amp;gt;&#039;&amp;lt;br/&amp;gt;&#039;&amp;lt;br/&amp;gt;&#039; Elements of items...Items are sub-elements of Channels btw...&amp;lt;br/&amp;gt;&#039;So&amp;lt;br/&amp;gt;&#039;Channel&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;-&amp;lt;br/&amp;gt;&#039;           |&amp;amp;#45;&amp;amp;#45;-&amp;amp;lt;item&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;           |&amp;amp;#45;&amp;amp;#45;-&amp;amp;lt;item&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;           |&amp;amp;#45;&amp;amp;#45;-&amp;amp;lt;item&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;           |&amp;amp;#45;&amp;amp;#45;-&amp;amp;lt;item&amp;amp;gt;&amp;lt;br/&amp;gt;&#039;                    |-Title&amp;lt;br/&amp;gt;&#039;                    |-Link&amp;lt;br/&amp;gt;&#039;                    |-Description&amp;lt;br/&amp;gt;&#039;                    |-Author&amp;lt;br/&amp;gt;&#039;                    |-Category&amp;lt;br/&amp;gt;&#039;                    |-Comments&amp;lt;br/&amp;gt;&#039;                    |-enclosure&amp;lt;br/&amp;gt;&#039;                    |-guid&amp;lt;br/&amp;gt;&#039;                    |-pubDate&amp;lt;br/&amp;gt;&#039;                    |-source&amp;lt;br/&amp;gt;&#039;But the point is that most rss feeds doesn&#039;t follow this sequence of tags...So, first, we&#039;ll remove the tags&amp;lt;br/&amp;gt;&#039;with the information attached to them, and we&#039;ll have TAG=Content type of arrays...&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;channeltags$=&amp;amp;quot;title,link,description,language,copyright,managingeditor,&amp;amp;quot;;_&amp;lt;br/&amp;gt;&amp;amp;quot;webmaster,pubdate,lastbuilddate,category,generator,docs,cloud,ttl,image,&amp;amp;quot;;_&amp;lt;br/&amp;gt;&amp;amp;quot;rating,textinput,skiphours,skipdays,&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;itemtags$=&amp;amp;quot;title,link,description,author,category,&amp;amp;quot;;_&amp;lt;br/&amp;gt;&amp;amp;quot;comments,enclosure,guid,pubdate,source,&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;imgtags$=&amp;amp;quot;url,title,link,width,height,description,&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;while tagend&amp;amp;lt;len(raw$)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;tagstart=instr(raw$,&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;,tagend)&amp;lt;br/&amp;gt;tagend=instr(raw$,&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;,tagstart)&amp;lt;br/&amp;gt;taglen=tagend-tagstart+1&amp;lt;br/&amp;gt;&#039;print mid$(raw$,leftbrack,taglen), rightbrack&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    if instr(mid$(raw$,tagstart,taglen),&amp;amp;quot;&amp;amp;lt;channel&amp;amp;gt;&amp;amp;quot;,0)&amp;amp;gt;0 then&amp;lt;br/&amp;gt;        chcount=1&amp;lt;br/&amp;gt;        print &amp;amp;quot;We found a channel! &amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;            while word$(channeltags$,chcount,&amp;amp;quot;,&amp;amp;quot;)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;              &#039;if instr(raw$,&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;+word$(channeltags$,chcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;)&amp;amp;lt;&amp;amp;gt;0 then&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                    tagstart=instr(raw$,&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;+word$(channeltags$,chcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;)+len(&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;+word$(channeltags$,chcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;)&amp;lt;br/&amp;gt;                    tagend=instr(raw$,&amp;amp;quot;&amp;amp;lt;/&amp;amp;quot;+word$(channeltags$,chcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;,tagstart)&amp;lt;br/&amp;gt;                    taglen=tagend-tagstart&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                        if word$(channeltags$,chcount,&amp;amp;quot;,&amp;amp;quot;)=&amp;amp;quot;image&amp;amp;quot; then &#039;Parsing image...&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                        itcount=1&amp;lt;br/&amp;gt;                        imgraw$=mid$(raw$,tagstart,taglen)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                            while word$(imgtags$,itcount,&amp;amp;quot;,&amp;amp;quot;)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                                imgstart=instr(imgraw$,&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;+word$(imgtags$,itcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;)+len(&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;+word$(imgtags$,itcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;)&amp;lt;br/&amp;gt;                                imgend=instr(imgraw$,&amp;amp;quot;&amp;amp;lt;/&amp;amp;quot;+word$(imgtags$,itcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;,imgstart)&amp;lt;br/&amp;gt;                                imglen=imgend-imgstart&amp;lt;br/&amp;gt;                                print &amp;amp;quot;Channel&amp;amp;gt;Image&amp;amp;gt;&amp;amp;quot;;word$(imgtags$,itcount,&amp;amp;quot;,&amp;amp;quot;);&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;;mid$(imgraw$,imgstart,imglen)&amp;lt;br/&amp;gt;                                itcount=itcount+1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                            wend&amp;lt;br/&amp;gt;                            goto [skipimage]&amp;lt;br/&amp;gt;                        end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                    print upper$(word$(channeltags$,chcount,&amp;amp;quot;,&amp;amp;quot;));&amp;amp;quot;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;quot;;mid$(raw$,tagstart,taglen)&amp;lt;br/&amp;gt;                    &#039;here, if we have image, seperately we must parse it...&amp;lt;br/&amp;gt;                [skipimage]&amp;lt;br/&amp;gt;              &#039;end if&amp;lt;br/&amp;gt;                    chcount=chcount+1&amp;lt;br/&amp;gt;            wend&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;Upto here, everything is working fine...Missing parts are GUID and media...image tag should be parsed independent...&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;            filepos=instr(raw$,&amp;amp;quot;&amp;amp;lt;item&amp;amp;gt;&amp;amp;quot;)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;            while instr(raw$,&amp;amp;quot;&amp;amp;lt;item&amp;amp;gt;&amp;amp;quot;)&amp;amp;lt;&amp;amp;gt;0&#039;Loop until there are no items left...&amp;lt;br/&amp;gt;            &#039;since channel is finished, cut the raw$ to only size of items...&amp;lt;br/&amp;gt;            currentitem$=mid$(raw$,filepos-1,instr(raw$,&amp;amp;quot;&amp;amp;lt;/item&amp;amp;gt;&amp;amp;quot;))&amp;lt;br/&amp;gt;            raw$=right$(raw$,len(raw$)-instr(raw$,&amp;amp;quot;/item&amp;amp;gt;&amp;amp;quot;))&amp;lt;br/&amp;gt;            itemcount=1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;             print &amp;amp;quot;New item!&amp;amp;quot;:print:print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;            while word$(itemtags$,itemcount,&amp;amp;quot;,&amp;amp;quot;)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;                        if instr(lower$(currentitem$),&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;+word$(itemtags$,itemcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;)&amp;amp;lt;&amp;amp;gt;0 then&amp;lt;br/&amp;gt;                           tagstart=instr(lower$(currentitem$),&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;+word$(itemtags$,itemcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;)+len(&amp;amp;quot;&amp;amp;lt;&amp;amp;quot;+word$(itemtags$,itemcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;)&amp;lt;br/&amp;gt;                           tagend=instr(lower$(currentitem$),&amp;amp;quot;&amp;amp;lt;/&amp;amp;quot;+word$(itemtags$,itemcount,&amp;amp;quot;,&amp;amp;quot;)+&amp;amp;quot;&amp;amp;gt;&amp;amp;quot;,tagstart)&amp;lt;br/&amp;gt;                           taglen=tagend-tagstart&amp;lt;br/&amp;gt;                           print upper$(word$(itemtags$,itemcount,&amp;amp;quot;,&amp;amp;quot;));&amp;amp;quot;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;quot;;mid$(currentitem$,tagstart,taglen)&amp;lt;br/&amp;gt;&#039;                           print tagstart,tagend,taglen&amp;lt;br/&amp;gt;                        end if&amp;lt;br/&amp;gt;                    itemcount=itemcount+1&amp;lt;br/&amp;gt;            filepos=1&amp;lt;br/&amp;gt;            wend&#039;single item&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;            wend&#039;whole items...&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    end if &#039;channel end if...&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;wend&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;Upto here, everything is working fine...Missing parts are GUID and media&amp;lt;br/&amp;gt;End Function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Function Window(sizex,sizey,posx,posy)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;End Function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Function lowercase (string$)&amp;lt;br/&amp;gt;lowercase$=lower$(string$)&amp;lt;br/&amp;gt;End Function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Function DownloadToFile(urlfile$, localfile$)&amp;lt;br/&amp;gt;    open &amp;amp;quot;URLmon&amp;amp;quot; for dll as #url&amp;lt;br/&amp;gt;    calldll #url, &amp;amp;quot;URLDownloadToFileA&amp;amp;quot;,_&amp;lt;br/&amp;gt;    0 as long,_         &#039;null&amp;lt;br/&amp;gt;    urlfile$ as ptr,_   &#039;url to download&amp;lt;br/&amp;gt;    localfile$ as ptr,_ &#039;save file name&amp;lt;br/&amp;gt;    0 as long,_         &#039;reserved, must be 0&amp;lt;br/&amp;gt;    0 as long,_         &#039;callback address, can be 0&amp;lt;br/&amp;gt;    DownloadToFile as ulong  &#039;0=success&amp;lt;br/&amp;gt;    close #url&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Function ValidURL(urlfile$)&amp;lt;br/&amp;gt;    open &amp;amp;quot;URLmon&amp;amp;quot; for dll as #url&amp;lt;br/&amp;gt;    calldll #url, &amp;amp;quot;IsValidURL&amp;amp;quot;,_&amp;lt;br/&amp;gt;    0 as long,_         &#039;ignored, must be 0&amp;lt;br/&amp;gt;    urlfile$ as ptr,_   &#039;urlfile to check&amp;lt;br/&amp;gt;    0 as ulong,_        &#039;ignored, must be 0&amp;lt;br/&amp;gt;    ValidURL as long&amp;lt;br/&amp;gt;    close #url&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function MultiByteToWideChar$(String$)&amp;lt;br/&amp;gt;    &#039;converts any string into unicode&amp;lt;br/&amp;gt;    CodePage = 0  :  dwFlags = 0&amp;lt;br/&amp;gt;    cchMultiByte = -1&amp;lt;br/&amp;gt;    lpMultiByteStr$ = String$&amp;lt;br/&amp;gt;    cchWideChar = len(String$) * 3&amp;lt;br/&amp;gt;    lpWideCharStr$ = space$(cchWideChar)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    calldll #kernel32, &amp;amp;quot;MultiByteToWideChar&amp;amp;quot;, _&amp;lt;br/&amp;gt;    CodePage as ulong, _    &#039;CP_ACP=0, ansi code page&amp;lt;br/&amp;gt;    dwFlags as ulong, _     &#039;use 0, flags for character translation&amp;lt;br/&amp;gt;    lpMultiByteStr$ as ptr,_&#039;the ascii string to convert&amp;lt;br/&amp;gt;    cchMultiByte as long, _ &#039;len of string, -1 for null-terminated string&amp;lt;br/&amp;gt;    lpWideCharStr$ as ptr, _&#039;buffer for returned ansi string&amp;lt;br/&amp;gt;    cchWideChar as long, _  &#039;size in wide characters of string buffer&amp;lt;br/&amp;gt;    result as long          &#039;returns number of wide characters written to buffer&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    if result = 0 then&amp;lt;br/&amp;gt;        MultiByteToWideChar$ = &amp;amp;quot;&amp;amp;quot;&amp;lt;br/&amp;gt;    else&amp;lt;br/&amp;gt;        MultiByteToWideChar$ = left$(lpWideCharStr$, result * 2)&amp;lt;br/&amp;gt;    end if&amp;lt;br/&amp;gt;    end function&amp;lt;br/&amp;gt;&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.lb  {font-family:monospace;}
.lb .imp {font-weight: bold; color: red;}
.lb .kw1 {color: #0000FF;}
.lb .kw2 {color: #AD0080;}
.lb .kw3 {color: #008080;}
.lb .co1 {color: #666666; font-style: italic;}
.lb .coMULTI {color: #666666; font-style: italic;}
.lb .es0 {color: #000099; font-weight: bold;}
.lb .br0 {color: #009900;}
.lb .sy1 {color: #339933;}
.lb .st0 {color: #008000;}
.lb .nu0 {color: #FF0000;}
.lb .me0 {color: #004000;}
.lb span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;lb&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;GLOBAL&lt;/span&gt; rss$
url$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;http://rss.cnn.com/rss/cnn_topstories.rss&amp;quot;&lt;/span&gt;
localfile$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;rss.xml&amp;quot;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
a&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;geturl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;url$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;localfile$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
a&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; StripTags&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rss$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; geturl&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;url$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;localfile$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
uniUrl$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; MultiByteToWideChar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;url$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; uniUrl$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Unable to convert URL to unicode string.&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;if result = 0, URL is valid&lt;/span&gt;
result &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; ValidURL&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;uniUrl$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; result &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;&#039;download html from url&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;Cursor&lt;/span&gt; Hourglass
    downloadresult &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; DownloadToFile&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;url$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;localfile$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; downloadresult &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Error downloading &amp;quot;&lt;/span&gt;;url$
    &lt;span class=&quot;kw1&quot;&gt;Cursor&lt;/span&gt; Normal
&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Invalid URL:&amp;quot;&lt;/span&gt;; url$
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;Now opening the rss file, and binding to local var...&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;Will be array for future multiple rss...&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;open&lt;/span&gt;  localfile$ &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;f
    rss$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;input&lt;/span&gt;$ &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;f&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;lof&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;f&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;close&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;f
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; StripTags&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;print only the tags starting with &amp;lt; and ending with &amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;According to RSS 2.0 standart we have the following channel data..&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;First, start with rss or xml declaration, version...Then&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;Channel&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-Title       Required&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-Link        Required&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-Description Required&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-Language         Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-Copyright        Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-managingEditor   Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-webMaster        Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-pubDate          Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-lastBuildDate    Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-category         Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-generator        Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-docs             Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-cloud            Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-ttl              Optional&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-image            Optional---------------------------------------------&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-rating           Optional                                             |&amp;gt;&amp;lt;url&amp;gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-textInput        Optional                                             |&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-skipHours        Optional                                             |&amp;lt;link&amp;gt;&amp;lt;/link&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;       |-skipDays         Optional                                             |&amp;lt;width&amp;gt;&amp;lt;/width&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                                                                               |&amp;lt;height&amp;gt;&amp;lt;/height&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                                                                               |&amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039; Elements of items...Items are sub-elements of Channels btw...&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;So&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;Channel----&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;           |---&amp;lt;item&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;           |---&amp;lt;item&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;           |---&amp;lt;item&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;           |---&amp;lt;item&amp;gt;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-Title&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-Link&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-Description&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-Author&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-Category&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-Comments&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-enclosure&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-guid&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-pubDate&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                    |-source&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;But the point is that most rss feeds doesn&#039;t follow this sequence of tags...So, first, we&#039;ll remove the tags&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;with the information attached to them, and we&#039;ll have TAG=Content type of arrays...&lt;/span&gt;
&amp;nbsp;
channeltags$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;title,link,description,language,copyright,managingeditor,&amp;quot;&lt;/span&gt;;_
&lt;span class=&quot;st0&quot;&gt;&amp;quot;webmaster,pubdate,lastbuilddate,category,generator,docs,cloud,ttl,image,&amp;quot;&lt;/span&gt;;_
&lt;span class=&quot;st0&quot;&gt;&amp;quot;rating,textinput,skiphours,skipdays,&amp;quot;&lt;/span&gt;
&amp;nbsp;
itemtags$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;title,link,description,author,category,&amp;quot;&lt;/span&gt;;_
&lt;span class=&quot;st0&quot;&gt;&amp;quot;comments,enclosure,guid,pubdate,source,&amp;quot;&lt;/span&gt;
&amp;nbsp;
imgtags$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;url,title,link,width,height,description,&amp;quot;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; tagend&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
tagstart&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;tagend&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
tagend&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;tagstart&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
taglen&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;tagend&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;tagstart&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;print mid$(raw$,leftbrack,taglen), rightbrack&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;mid$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;tagstart&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;taglen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;channel&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        chcount&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;We found a channel! &amp;quot;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;channeltags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;chcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
              &lt;span class=&quot;co1&quot;&gt;&#039;if instr(raw$,&amp;quot;&amp;lt;&amp;quot;+word$(channeltags$,chcount,&amp;quot;,&amp;quot;)+&amp;quot;&amp;gt;&amp;quot;)&amp;lt;&amp;gt;0 then&lt;/span&gt;
&amp;nbsp;
                    tagstart&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;channeltags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;chcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;channeltags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;chcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    tagend&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;channeltags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;chcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;tagstart&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    taglen&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;tagend&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;tagstart
&amp;nbsp;
                        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;channeltags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;chcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;image&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;Parsing image...&lt;/span&gt;
&amp;nbsp;
                        itcount&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
                        imgraw$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;mid$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;tagstart&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;taglen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
                            &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;imgtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
                                imgstart&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;imgraw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;imgtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;imgtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                                imgend&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;imgraw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;imgtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;imgstart&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                                imglen&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;imgend&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;imgstart
                                &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Channel&amp;gt;Image&amp;gt;&amp;quot;&lt;/span&gt;;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;imgtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;;&lt;span class=&quot;kw2&quot;&gt;mid$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;imgraw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;imgstart&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;imglen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                                itcount&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;itcount&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
                            &lt;span class=&quot;kw1&quot;&gt;wend&lt;/span&gt;
                            &lt;span class=&quot;kw1&quot;&gt;goto&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;skipimage&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
                        &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
                    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;upper$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;channeltags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;chcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;&lt;/span&gt;;&lt;span class=&quot;kw2&quot;&gt;mid$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;tagstart&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;taglen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                    &lt;span class=&quot;co1&quot;&gt;&#039;here, if we have image, seperately we must parse it...&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;skipimage&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
              &lt;span class=&quot;co1&quot;&gt;&#039;end if&lt;/span&gt;
                    chcount&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;chcount&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;wend&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;Upto here, everything is working fine...Missing parts are GUID and media...image tag should be parsed independent...&lt;/span&gt;
&amp;nbsp;
            filepos&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;item&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;item&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;&#039;Loop until there are no items left...&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;&#039;since channel is finished, cut the raw$ to only size of items...&lt;/span&gt;
            currentitem$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;mid$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;filepos&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/item&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            raw$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;right$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;raw$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;/item&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            itemcount&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
             &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;New item!&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;itemtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itemcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&amp;nbsp;
                        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;lower$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;currentitem$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;itemtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itemcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
                           tagstart&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;lower$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;currentitem$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;itemtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itemcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;itemtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itemcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                           tagend&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;instr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;lower$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;currentitem$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;itemtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itemcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;tagstart&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                           taglen&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;tagend&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;tagstart
                           &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;upper$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;itemtags$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;itemcount&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;&lt;/span&gt;;&lt;span class=&quot;kw2&quot;&gt;mid$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;currentitem$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;tagstart&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;taglen&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;                           print tagstart,tagend,taglen&lt;/span&gt;
                        &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
                    itemcount&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;itemcount&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
            filepos&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;wend&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;&#039;single item&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;wend&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;&#039;whole items...&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;channel end if...&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;wend&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;Upto here, everything is working fine...Missing parts are GUID and media&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Window&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sizex&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;sizey&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;posx&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;posy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; lowercase &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
lowercase$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;lower$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; DownloadToFile&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;urlfile$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; localfile$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;open&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;URLmon&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;dll&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;url
    &lt;span class=&quot;kw1&quot;&gt;calldll&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;url&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;URLDownloadToFileA&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_
    &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_         &lt;span class=&quot;co1&quot;&gt;&#039;null&lt;/span&gt;
    urlfile$ &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ptr&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_   &lt;span class=&quot;co1&quot;&gt;&#039;url to download&lt;/span&gt;
    localfile$ &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ptr&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_ &lt;span class=&quot;co1&quot;&gt;&#039;save file name&lt;/span&gt;
    &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_         &lt;span class=&quot;co1&quot;&gt;&#039;reserved, must be 0&lt;/span&gt;
    &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_         &lt;span class=&quot;co1&quot;&gt;&#039;callback address, can be 0&lt;/span&gt;
    DownloadToFile &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ulong&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;&#039;0=success&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;close&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;url
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; ValidURL&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;urlfile$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;open&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;URLmon&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;dll&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;url
    &lt;span class=&quot;kw1&quot;&gt;calldll&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;url&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;IsValidURL&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_
    &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_         &lt;span class=&quot;co1&quot;&gt;&#039;ignored, must be 0&lt;/span&gt;
    urlfile$ &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ptr&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_   &lt;span class=&quot;co1&quot;&gt;&#039;urlfile to check&lt;/span&gt;
    &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ulong&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_        &lt;span class=&quot;co1&quot;&gt;&#039;ignored, must be 0&lt;/span&gt;
    ValidURL &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;long&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;close&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;url
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; MultiByteToWideChar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;String$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;&#039;converts any string into unicode&lt;/span&gt;
    CodePage &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;  dwFlags &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
    cchMultiByte &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    lpMultiByteStr$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; String$
    cchWideChar &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;String$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;
    lpWideCharStr$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;space$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;cchWideChar&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;calldll&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;kernel32&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;MultiByteToWideChar&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; _
    CodePage &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ulong&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; _    &lt;span class=&quot;co1&quot;&gt;&#039;CP_ACP=0, ansi code page&lt;/span&gt;
    dwFlags &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ulong&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; _     &lt;span class=&quot;co1&quot;&gt;&#039;use 0, flags for character translation&lt;/span&gt;
    lpMultiByteStr$ &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ptr&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;_&lt;span class=&quot;co1&quot;&gt;&#039;the ascii string to convert&lt;/span&gt;
    cchMultiByte &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; _ &lt;span class=&quot;co1&quot;&gt;&#039;len of string, -1 for null-terminated string&lt;/span&gt;
    lpWideCharStr$ &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;ptr&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; _&lt;span class=&quot;co1&quot;&gt;&#039;buffer for returned ansi string&lt;/span&gt;
    cchWideChar &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; _  &lt;span class=&quot;co1&quot;&gt;&#039;size in wide characters of string buffer&lt;/span&gt;
    result &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;long&lt;/span&gt;          &lt;span class=&quot;co1&quot;&gt;&#039;returns number of wide characters written to buffer&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; result &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        MultiByteToWideChar$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;
        MultiByteToWideChar$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;left$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;lpWideCharStr$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; result &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&#039;Updated on 12/12/2009 - Minor Changes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: normal;&quot;&gt; Comments, advices, and any help on GUI is welcomed...Probably, i will need to deal with listview&#039;s little bit...Actually i have another idea to make the GUI, html based and show it in a lightweight browser...Not sure but again from Alycesrestaurant.com or lbpe.wikispaces.com...I&#039;ll find soon...&lt;br /&gt;
ozgur(.)erdiller(at)gmail(.)com&lt;/span&gt;</description>
          </item>

  </channel>
</rss>