David,
It uses a browser object but transparent to user (user doesn't see any form or browser).
Cetin
>Hi Cetin,
>
>Thanks for the great parsing info. I guess the area I am having difficulty in is actually making the call to the web site without loading a browser object.
>
>This app is in VFP 7 and I am not seeing much in the way of HTTP functionality, maybe a later version does have that. I am also looking at Rick Strahls wwHTTP function, but I don't have that version of wwIPStuff yet, so I haven't tested.
>
>Thanks again Cetin.
>
>David
>
>
>>>A customer has a web-based application that returns a simple text html string. I can call the web app from my browser, and the results are displayed.
>>>
>>>How can I programatically call the web page and (instead of displaying the output in a browser) capture the output as a string?
>>>
>>>Thanks very much in advance.
>>>
>>>David
>>
>>Something like this?
>>
>>Local m.myHTML,m.parsed
>>myHTML=[This<br> is an <font color="red"><b>example</b></font><Hr>x2 < x3]
>>*myHTML= FileToStr(GetFile('HTM'))
>>parsed = ''
>>oParser = Createobject('myParser',m.myHTML,@m.parsed)
>>? m.Parsed
>>*StrToFile(m.Parsed,'ParseResult.txt')
>>
>>Define Class myParser As Form
>> Add Object oWB As OleControl With ;
>> OleClass = 'Shell.Explorer'
>>
>> Procedure Init
>> Lparameters tcHTML, tcParse
>> lcTemp = Sys(2015)+'.htm'
>> Strtofile(tcHTML,lcTemp)
>> With This.oWB
>> .Navigate2('file://'+Fullpath(lcTemp))
>> Wait window 'Parsing...' nowait
>> Do While .ReadyState # 4
>> EndDo
>> Endwith
>> Erase (lcTemp)
>> tcParse = This.oWB.Document.body.innerText
>> Wait clear
>> Return .f.
>>Endproc
>>Enddefine
>>
Cetin