@name HTML parsing test
@inputs
@outputs List:array
@persist 
@trigger 
httpRequest("http://www1.dd-tech.com:9000/") #This should be a simple file dump, not something fancy with graphics, just a simple file directory page.
runOnHTTP(1)
Data=httpData()
if(httpClk()){
    List=array() #let's start with a blank slate
    List=Data:explode("HREF=") #pass1, find all directory entries
    for(C=1,List:count()){
        Item=httpUrlDecode(List[C,string]:explode(">")[1,string]) #crop the string to the end of the entry
        Item=Item:replace("&#39;","'") #repair any undecoded representations of apostrophy
        IL=Item:length() #get the length so we can crop off the extra quotes
        Item=Item:sub(2,IL-1) #crop the quotes off the first and last characters 
        List[C,string]=Item #resubmit the processed item to the list. 
    }
    List[1,string]="../" #just erase all the useless header crap and put a back directory entry instead.
}
printTable(List)
