Break On ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; $XMLTVFiles - Enter the full path to the files you want to extract ; ; channel data from in quotes. If more than one source separate by commas. ; ; E.G. $XMLTVFiles="c:\xmltv\1.xml","c:\xmltv\2.xml" ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $XMLTVFiles="c:\xmltv\1.xml","C:\Program Files\SageTV\SageTV\2.xml" For each $File in $XMLTVFiles Open(1,$File) Del "C:\Program Files\SageTV\SageTV\xmltv_channel_ids.txt" Open(2,"C:\Program Files\SageTV\SageTV\xmltv_channel_ids.txt",5) Do $chanidpre=Readline(1) IF instr($chanidpre,"channel id=") IF instr($chanidpre,"www.mtepgdplu.com") $Longpre=Readline(1) $numberpre=Readline(1) $Shortpre=Readline(1) Else Readline(1) Readline(1) $numberpre=Readline(1) $Shortpre=Readline(1) $Longpre=Readline(1) ENDIF $chanidspl=split($chanidpre,'"') $chanid=$chanidspl[1] $numbersplpre=split($numberpre,">") $numberspl=split($numbersplpre[1],"<") $number=$numberspl[0] $shortsplpre=split($shortpre,">") $shortspl=split($shortsplpre[1],"<") $short=$shortspl[0] IF instr($short," ") $shortsplpost=split($shortspl[0]) $short=$shortsplpost[1] ENDIF $longsplpre=split($longpre,">") $longspl=split($longsplpre[1],"<") $long=$longspl[0] Writeline(3,$chanid+",") WriteLine(2,"channel.$chanid.numbers=$number"+ @CRLF) WriteLine(2,"channel.$chanid.names=$short, $long"+ @CRLF) ENDIF Until instr($chanidpre,"