Hi All,
I am going to create a personal weather board.
It is easy to show the picutre on website ( just link the picture to
picturesbox's properties )
but I dont' know how to add some other text near by..
for example:
I can get the weather icon, but I don't know how to get the description
text...
What should I do?
Best regards,
Boki. 9 3892
Depends if you are talking about text adjacent to the picture or Alernate
text, iether way you will need to scrape the site and parse the text. Seach
for web scraping on google.
--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"Boki" <bo******@ms21. hinet.net> wrote in message
news:OL******** *****@TK2MSFTNG P02.phx.gbl... Hi All,
I am going to create a personal weather board.
It is easy to show the picutre on website ( just link the picture to picturesbox's properties )
but I dont' know how to add some other text near by..
for example:
I can get the weather icon, but I don't know how to get the description text...
What should I do?
Best regards, Boki.
On Tue, 18 Apr 2006 13:46:29 +0800, Boki <bo******@ms21. hinet.net>
wrote: Hi All,
I am going to create a personal weather board.
It is easy to show the picutre on website ( just link the picture to picturesbox' s properties )
but I dont' know how to add some other text near by..
for example:
I can get the weather icon, but I don't know how to get the description text...
What should I do?
Best regards, Boki.
Don't know where you are, but if in the U.S. the NWS has several XML
feeds which make it very easy to use directly in a app. Here is a
current observation example: http://www.weather.gov/data/current_obs/KSFO.xml
Gene
gene kelley 寫道: On Tue, 18 Apr 2006 13:46:29 +0800, Boki <bo******@ms21. hinet.net> wrote:
Hi All,
I am going to create a personal weather board.
It is easy to show the picutre on website ( just link the picture to picturesbox' s properties )
but I dont' know how to add some other text near by..
for example:
I can get the weather icon, but I don't know how to get the description text...
What should I do?
Best regards, Boki.
Don't know where you are, but if in the U.S. the NWS has several XML feeds which make it very easy to use directly in a app. Here is a current observation example: http://www.weather.gov/data/current_obs/KSFO.xml
Gene
I use InStr() to search WebBrowser1.Doc umentText, could you please
advice how to search the XML data tag? ( a better way than InStr() )..
Best regards,
Boki.
Boki,
To read an unknown xml document is this probably the easiest method http://www.vb-tips.com/default.aspx?...a-22589f018cd4
I hope this helps,
Cor
"Boki" <bo******@ms21. hinet.net> schreef in bericht
news:11******** **************@ v46g2000cwv.goo glegroups.com.. .
gene kelley ??: On Tue, 18 Apr 2006 13:46:29 +0800, Boki <bo******@ms21. hinet.net> wrote:
Hi All,
I am going to create a personal weather board.
It is easy to show the picutre on website ( just link the picture to picturesbox' s properties )
but I dont' know how to add some other text near by..
for example:
I can get the weather icon, but I don't know how to get the description text...
What should I do?
Best regards, Boki.
Don't know where you are, but if in the U.S. the NWS has several XML feeds which make it very easy to use directly in a app. Here is a current observation example: http://www.weather.gov/data/current_obs/KSFO.xml
Gene
I use InStr() to search WebBrowser1.Doc umentText, could you please
advice how to search the XML data tag? ( a better way than InStr() )..
Best regards,
Boki.
Hi,
I have used the yahoo weather rss for this. They have a
weather sticker embedded in it. The address for the rss feed has a
querystring for getting the weather. In the us use your zipcode for getting
the weather. This example requires a textbox (txtZip) for entering in a
zipcode to get the weather for, webbrowser control to display the weather
sticker, and a button (btnGetWeather) .
Private Sub btnGetWeather_C lick(ByVal sender As System.Object, ByVal e
As System.EventArg s) Handles btnGetWeather.C lick
Dim sr As IO.StreamReader
Dim wc As New System.Net.WebC lient
Dim strUrl As String
Dim strOut As String = ""
strUrl =
String.Format(" http://xml.weather.yah oo.com/forecastrss?p={ 0}", txtZip.Text)
Try
sr = New IO.StreamReader (wc.OpenRead(st rUrl))
Dim strHtml As String = sr.ReadToEnd
Dim x As Integer = strHtml.IndexOf ("<img src")
Dim y As Integer = strHtml.IndexOf (")<br/>")
strOut = strHtml.Substri ng(x, y - x + 6)
sr.Close()
Catch
strOut = "<h1>Error getting weather</h1>"
Finally
WebBrowser1.Doc umentText = strOut
End Try
End Sub
Ken
-----------------
"Boki" <bo******@ms21. hinet.net> wrote in message
news:OL******** *****@TK2MSFTNG P02.phx.gbl... Hi All,
I am going to create a personal weather board.
It is easy to show the picutre on website ( just link the picture to picturesbox's properties )
but I dont' know how to add some other text near by..
for example:
I can get the weather icon, but I don't know how to get the description text...
What should I do?
Best regards, Boki.
"Boki" <bo******@ms21. hinet.net> schrieb: I am going to create a personal weather board.
It is easy to show the picutre on website ( just link the picture to picturesbox's properties )
but I dont' know how to add some other text near by..
for example:
I can get the weather icon, but I don't know how to get the description text...
Parsing an HTML file:
MSHTML Reference
<URL:http://msdn.microsoft. com/library/default.asp?url =/workshop/browser/mshtml/reference/reference.asp>
- or -
..NET Html Agility Pack: How to use malformed HTML just like it was
well-formed XML...
<URL:http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx>
Download:
<URL:http://www.codefluent. com/smourier/download/htmlagilitypack .zip>
- or -
SgmlReader 1.4
<URL:http://www.gotdotnet.c om/Community/UserSamples/Details.aspx?Sa mpleGuid=B90FDD CE-E60D-43F8-A5C4-C3BD760564BC>
If the file read is in XHTML format, you can use the classes contained in
the 'System.Xml' namespace for reading information from the file.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:eL******** ******@TK2MSFTN GP02.phx.gbl... Hi,
I have used the yahoo weather rss for this. They have a weather sticker embedded in it. The address for the rss feed has a querystring for getting the weather. In the us use your zipcode for getting the weather. This example requires a textbox (txtZip) for entering in a zipcode to get the weather for, webbrowser control to display the weather sticker, and a button (btnGetWeather) .
Private Sub btnGetWeather_C lick(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnGetWeather.C lick Dim sr As IO.StreamReader Dim wc As New System.Net.WebC lient Dim strUrl As String Dim strOut As String = "" strUrl = String.Format(" http://xml.weather.yah oo.com/forecastrss?p={ 0}", txtZip.Text)
Try sr = New IO.StreamReader (wc.OpenRead(st rUrl)) Dim strHtml As String = sr.ReadToEnd Dim x As Integer = strHtml.IndexOf ("<img src") Dim y As Integer = strHtml.IndexOf (")<br/>") strOut = strHtml.Substri ng(x, y - x + 6) sr.Close() Catch strOut = "<h1>Error getting weather</h1>" Finally WebBrowser1.Doc umentText = strOut End Try End Sub
Ken
Neat Ken!!! And works well.
james
(not the original poster, but, someone who appreciates interesting code!)
You can try SWExplorerAutom ation (http:\\webunit testing.com).
On 18 Apr 2006 01:03:50 -0700, "Boki" <bo******@ms21. hinet.net> wrote: gene kelley ???
On Tue, 18 Apr 2006 13:46:29 +0800, Boki <bo******@ms21. hinet.net> wrote:
>Hi All, > >I am going to create a personal weather board. > >It is easy to show the picutre on website ( just link the picture to >picturesbox' s properties ) > >but I dont' know how to add some other text near by.. > >for example: > >I can get the weather icon, but I don't know how to get the description >text... > >What should I do? > >Best regards, >Boki.
Don't know where you are, but if in the U.S. the NWS has several XML feeds which make it very easy to use directly in a app. Here is a current observation example: http://www.weather.gov/data/current_obs/KSFO.xml
Gene
I use InStr() to search WebBrowser1.Doc umentText, could you please advice how to search the XML data tag? ( a better way than InStr() )..
Best regards, Boki.
As noted in other responses, you would want to read the XML elements
directly (XML Reader Class). Has nothing to do with a WebBrowser.
Gene This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: futureofphp |
last post by:
Hi I am having a PHP based intranet home page. How can I add local
weather forecast for the day to it? Is there any free weather forevast
providers? I am interested in the local weather of Europe. I found
www.wunderground.com its not that good, the banner does not look
impressive, something like CNN or BBC is cool.
Thanks
|
by: Jeremy Jones |
last post by:
is looking for two software developers to develop tests (written in
Python) to test our internally developed applications for the cable
tier. There is a reference to the job on the Python Job Board
(http://www.python.org/Jobs.html). Anyone interested can email me at
zanesdad at bellsouth dot net or jmjones at weather dot com.
Jeremy...
|
by: pmclinn |
last post by:
I have the xml feed belowfrom this link:
http://www.weather.gov/alerts/ct.rss
I for the life of me can not get this data to format in a html table
using client side scripting. Any help would be much appreciated.
<?xml version="1.0" encoding="UTF-8" ?>
- <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
- <channel>...
|
by: jimb |
last post by:
Looking for a simple view on the weather. Just learning the xml stuff.
I would like to add to the the weather.com icon. Any help is
appreciated.
<html>
<head>
<body bgcolor="#000000" text="#FFFFFF">
<p class=MsoNormal><o:p></o:p><span
style='font-size:288.0pt;font-family:Arial'>
|
by: dawnrager |
last post by:
Hi, everyone. I'm having a really difficult time pasting in generated code from the Weather Channel for a weather sticker for my webpage. This was the code sent to me via email:
<!-- cut and paste the below code into your HTML editor --><div id="wx_module_2384"> <a href="http://www.weather.com/weather/local/15904">Johnstown, PA (15904)...
| |
by: sandeep patil |
last post by:
how to diplay the weather condiction on my webpage
suppose i want to read weather from www.bbc.co.uk/weather.html
how i can read it usin program
|
by: seancron |
last post by:
Does anybody have any suggestions for getting started on desigining a
desktop weather application in Python?
I've been looking for access to weather data and while I have found
several including the weather.com service I've decided to use the
Yahoo! Rss Weather feed since it doesn't have a license like the
weather.com service does. However...
|
by: shaynenash |
last post by:
I wrote this script to calculate if water restrictions were in place if it was hotter than 25deg C. It has turned out to be a pretty good weather widget that can be used elsewhere. This was initially written for Northern Midlands Council in Tasmania, Australia. I wrote this for Internet explorer and haven't tested it elsewhere. It would probably...
|
by: Craig M |
last post by:
Our current intranet site displays the weather with a 7 day forecast. We
have to manually enter all the weather info into a SQL DB using a web front
end, but would like to use an RSS feed.
All of the feeds I've found on the web are only 2-3 day forecast. Does
anyone know if there are any RSS weather feeds with a 7 day forecast? Or
any...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| | |