Alaska Software Inc. - HRF general sample -code ?
Username: Password:
AuthorTopic: HRF general sample -code ?
Bengt OveliusHRF general sample -code ?
on Fri, 07 May 2004 09:39:07 +0200
The HTML reflection framework has a sample showing how to
automatically  search  the Alaska knowledgebase.

I would like to write a general source that retrieves a specific
value at the web, without knowing exactly how the web looks.

One example could be an administrative XBASE programs
that picks up the Dollar/Euro  level each day on the web
at the customers bank, without knowing exactly what the
web-page of that particular bank looks like
(just an example, it could just as well be flight times,stock market or
anything)

The customer could use his web-browser and navigate to the page of interest.
and copy the URL into the XBASE program

But then, the XBASE program should guide the customer to pick
the Euro/Dollar figure among hundreds of values from the webpage
or from subpages.

As I am new to HRF  I would appreciate some source speeding up
this approach-

HRF has a lot of functions,
and it has some sample code over creating htm,
but very little sample code over  analyzing htm .

Looking forward to comments on this
Best regards
Bengt Ovelius
Phil Ide
Re: HRF general sample -code ?
on Fri, 07 May 2004 08:58:31 +0100
Bengt,

> The customer could use his web-browser and navigate to the page of interest.
> and copy the URL into the XBASE program
> 
> But then, the XBASE program should guide the customer to pick
> the Euro/Dollar figure among hundreds of values from the webpage
> or from subpages.

Sounds like a WIS application 

Regards,

Phil Ide

Kid: a noise with dirt on it.
Bengt OveliusRe: HRF general sample -code ?
on Fri, 07 May 2004 10:37:27 +0200
I have only found WIS compiled with 1.7
If I understand it right, WIS is an application generator
written in ASINET and HRF   !?

May we suggest ALASKA to release the WIS-source code  ???
WIS  seems to be a low priority   (or vanishing ?)
project at ALASKA,
but a released source would perhaps bring WIS to life
again  and help XBASE programmers
gain understanding  of ASINET and HRF
applications  ??


Best regards
Bengt Ovelius






> Sounds like a WIS application 
> Regards,
> Phil Ide
Phil Ide
Re: HRF general sample -code ?
on Fri, 07 May 2004 13:15:40 +0100
Bengt,

> May we suggest ALASKA to release the WIS-source code  ???
> WIS  seems to be a low priority   (or vanishing ?)
> project at ALASKA,
> but a released source would perhaps bring WIS to life
> again  and help XBASE programmers
> gain understanding  of ASINET and HRF
> applications  ??

I've been in discussion with Steffen about WIS.  How about I say that it is
Ok to hold your breath?

Regards,

Phil Ide

Why is common sense is the least common of all senses?
Bengt OveliusRe: HRF general sample -code ?
on Fri, 07 May 2004 14:24:56 +0200
This would be breathtaking news, thanks  !


> I've been in discussion with Steffen about WIS.  How about I say that it
is
> Ok to hold your breath?
Boris Borzic Re: HRF general sample -code ?
on Fri, 07 May 2004 15:06:19 +0200
Have you thought about using SOAP for this. There are many SOAP web 
services that provide exchange rates, stock market quotes, package delivery 
status, flight info, etc...

SOAP is like executing a remote procedure call (RPC). You can pass data to 
the remote function and the remote function can return results back to you. 
Much simpler than parsing an HTML response!

There are SOAP samples for currency exchange, language translation, DNS 
query and more included with Xb2.NET. To get the demo send an email to 
demo@xb2.net with subject "xb2.net demo". You will receive an automated 
reply.

BTW... with Xb2.NET you can build SOAP client as well as server 
applications.

Best regards,
Boris Borzic

http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools

"Bengt Ovelius" <picotech@telia.com> wrote in
news:gLA7#ZANEHA.5064@S15147418: 

> I would like to write a general source that retrieves a specific
> value at the web, without knowing exactly how the web looks.
> 
> One example could be an administrative XBASE programs
> that picks up the Dollar/Euro  level each day on the web
> at the customers bank, without knowing exactly what the
> web-page of that particular bank looks like
> (just an example, it could just as well be flight times,stock market
> or anything)
> 
> The customer could use his web-browser and navigate to the page of
> interest. and copy the URL into the XBASE program
> 
> But then, the XBASE program should guide the customer to pick
> the Euro/Dollar figure among hundreds of values from the webpage
> or from subpages.
Bengt OveliusRe: HRF general sample -code ?
on Fri, 07 May 2004 15:51:22 +0200
Boris,
yes, I have tested and considered this with XB2NET,
and it is technically superior.
But at the moment there must be a factor 100 times
more data available in HTM -form compared to SOAP.

There is also a visual simplicity for the customers to
seach & find data on  HTM -websites, I guess.



Best regards,
Bengt Ovelius
Bengt OveliusRe: HRF general sample -code ?
on Fri, 07 May 2004 17:19:53 +0200
HRF Problems:

As I understand it,
the principle of HRF is,
if you have an image on the browser, the information can
easily be extracted by knowing the URL.

I have been playing around and found exeptions:

On this page you will find a table of figures
It can be loaded  OK with
cCA:=LoadFromUrl(cURL,,,,,"POST",cCGI)

http://www.carnegie.se/templates/Iframe.aspx?id=2691

but the table of figures are not present in cCA

The figures are available in some kind of sub-page
http://193.235.27.51/funds/kurser_och_vardeutveckling.asp?Changer=PriceAndPe
rformance&Caller=Recently

Is there  a simple set of commands in HRF that extracts everything
frn the URL where the figures are actuelly seen ?

http://www.carnegie.se/templates/Iframe.aspx?id=2691


It would be nice with a high-level command that returns
a large array with clean information.

Regards
Bengt Ovelius
Phil Ide
Re: HRF general sample -code ?
on Fri, 07 May 2004 17:21:57 +0100
Bengt,

> The figures are available in some kind of sub-page
> http://193.235.27.51/funds/kurser_och_vardeutveckling.asp?Changer=PriceAndPe
> rformance&Caller=Recently

You need to parse the file from the first url to find the iFrame url, then
do a LoadUrl() on that.  This is one of the biggest problems WIS has to
overcome - is what is highlighted on the visible page, part of that page or
something else.

Regards,

Phil Ide

No, RAM disk is NOT an installation procedure...
Bengt OveliusRe: HRF general sample -code ?
on Sun, 09 May 2004 12:39:08 +0200
What I am looking for, is a high level command that  simply returns
text  and information behind a URL.
It must be of general interest to all XBASE programmers
to get it with one single, general  command, if possible

After a day of testing HRF, I was not very successful, probably due
to very few examples in the documentation.

But I did find a 3pp program, Detagger, that handles the task
beautifully. There is also a api version and a command line version
of the same program available! ($25)

Below is my testing /example url
Here you can see the table, but you can't get it
http://www.carnegie.se/templates/Iframe.aspx?id=2691

The figures are available in some kind of sub-page
cURL=
http://193.235.27.51/funds/kurser_och_vardeutveckling.asp?Changer=PriceAndPe
rformance&Caller=Recently

Here is the ASINET command to get
cCA:=LoadFromUrl(cURL,,,,,"POST",cCGI)

This is the beautiful job that detagger makes with the string cCA
In this string it is really easy to grab what you want or to dump it into
a database

$_$_BEGIN_COMMA_DELIMITED_TABLE
"Fonder med daglig kurs-  uppdatering 2004-05-06","Visa graf","Pris","1 dag
%","31/12 %","1 mn %","3 mn %"
"Carnegie European Equity","","105.66","-1.33","9.96","-2.51","5.09"
"Carnegie Fund of Funds","","84.37","-1.41","5.04","-4.18","0.45"
"Carnegie Medical","","380.58","0.13","11.24","-0.72","5.95"
"Carnegie Nordic Markets","","427.97","-1.29","4.42","-3.33","-0.38"
"Carnegie Smbolag","","191.92","-1.84","8.91","0.88","0.85"
"Carnegie Svensk Kort Rnta","","108.74","0.00","1.26","0.02","0.71"
"Carnegie Sverige","","178.76","-3.07","6.08","-3.78","-1.57"
"Carnegie Technology","","28.76","-0.69","-16.30","-14.66","-16.76"
"Carnegie WorldWide","","332.09","-1.43","8.14","-5.65","4.31"
"CWW Emerging Growth","","37.86","-0.63","4.41","-7.61","2.77"
$_$_END_TABLE

============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
========================
Converted by an unregistered version of Detagger 2.3
Visit http://www.jafsoft.com/detagger/
This TEXT_FOOTER can be customised or removed in the registered version
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================
========================


Could this job be done with HRF -commands ????
Phil Ide
Re: HRF general sample -code ?
on Mon, 10 May 2004 10:30:49 +0100
Bengt,

> Could this job be done with HRF -commands ????

Yes.  Actually it would require a combination of HRF with ASINET (or some
other tcp/ip library), and generally what you need to do is either add some
intelligence (i.e. recognise if the downloaded page is a frameset and if so
fetch the individual frames), or some code that will traverse the document
looking for iFrames (and downloading the respective url).

Regards,

Phil Ide

If love is blind, lingerie makes great braille.