 |
| XML General XML discussions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 19th, 2004, 10:24 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Retrieve Info...
Hi all ,Please help...
I want to know how to retreive information from a differant web site.
i.e: Put currency rates on my web site from a differant web site.
I know it's possible,but what the options?
|
|

May 19th, 2004, 05:08 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hello,
Either than copying/pasting, which could break copyright info, if you know of a web service, you can use that, using any language that supports it. There are quite a bit, such as Java, .NET languages, etc.
Brian
|
|

May 21st, 2004, 03:37 PM
|
|
Authorized User
|
|
Join Date: Nov 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
betzy:
I think what your asking is how to retreive information via http request?
If so, there are several components. Java has a HttpURLConnection class you can use. I've also automated Internet Explorer, to mention a couple of free options. There are also a few components out there for sale or free.
You can also do a google search for "Screen Scraping"
Cheers,
David
thanks
|
|

May 24th, 2004, 02:40 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Acctualy what I wnat to do is to take data ,like weather for example from another web site like CNN.com and the data will be shown in my page.
I know it's possible...
By the way I'm talking about Visual Studio 6.
|
|

May 25th, 2004, 07:34 AM
|
|
Authorized User
|
|
Join Date: Nov 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Exactly,
Basically, you want to retreive the page where the data is on, in this case CNN.com, and parse that page to remove the data you're not interested in. You'd be doing the same thing your browser does to retreive the page, which is to generate an http request. The result will be returned in the form of HTML (which is interpreted by the browser), you would then parse out the unwanted HTML, leaving only what you're interested in, and in your web page (which will probably be asp, php, jsp or some cgi), include the parsed html. Bear in mind that you will not be able to do this in a static html page.
My answer above applies. You need an object to perform the http request and retreive the CNN page. You can also automate Internet Explorer.
Give me an idea of what environment you are using and perhaps I can recommend the best way to go about it
thanks
|
|

May 25th, 2004, 09:24 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Keep in mind- what you want to do - *Is likely to be a copyright violation*. Not something anyone should condone- especially people in an industry that rely on copyright protections for their own work.
Hal Levy
Web Developer, PDI Inc.
NOT a Wiley/Wrox Employee
|
|

May 25th, 2004, 01:11 PM
|
|
Authorized User
|
|
Join Date: Nov 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Betzy,
Hal has a point. If I remember correctly, from past experience, CNN has an agreement where they allow you to use their content provided you include links to their site. You can always check with them.
That said, you have another post on this topic, there I provided you with some sample code that should help you accomplish this.
thanks
|
|

June 4th, 2004, 02:10 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm using Visual Studio 6 which means ASP 3.0.
Lets assume I'm doing as you said.
What happens if they are changing the structure of that specifc page,and I have a code to retreive the data.All thing won't work,right?
|
|
 |