473,473 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to get a string from a html source code?

Luk
Hello,

i need to get a string / some strings from a html source code
(external)

url: http://wow.buffed.de/?c=2170577&tab=8

there are under "Scherbenwelt" these strings:

Ehrenfeste
Wohlwollend
6107 / 12000

how i can get them through a vb.net application?

can anyone post me an sample sourcecode?

thx anyway!

Greets, Lukas

Mar 7 '07 #1
4 9983
vb6 can do this via serverxmlhttp

On Mar 7, 2:19 am, "Luk" <lukas.prelov...@gmail.comwrote:
Hello,

i need to get a string / some strings from a html source code
(external)

url:http://wow.buffed.de/?c=2170577&tab=8

there are under "Scherbenwelt" these strings:

Ehrenfeste
Wohlwollend
6107 / 12000

how i can get them through a vb.net application?

can anyone post me an sample sourcecode?

thx anyway!

Greets, Lukas

Mar 7 '07 #2
Luk
On 7 Mrz., 17:26, "aaron.ke...@gmail.com" <aaron.ke...@gmail.com>
wrote:
vb6 can do this via serverxmlhttp

On Mar 7, 2:19 am, "Luk" <lukas.prelov...@gmail.comwrote:
Hello,
i need to get a string / some strings from a html source code
(external)
url:http://wow.buffed.de/?c=2170577&tab=8
there are under "Scherbenwelt" these strings:
Ehrenfeste
Wohlwollend
6107 / 12000
how i can get them through a vb.net application?
can anyone post me an sample sourcecode?
thx anyway!
Greets, Lukas


I'm using Visual Basic 2005

Mar 7 '07 #3
Hi Luk,

i need to get a string / some strings from a html source code
(external)
\\
Dim br As New WebBrowser
Dim Text, cuttext As String
br.Navigate("http://wow.buffed.de:80/?c=2170577&tab=8")
While Not br.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
End While

Text = br.DocumentText
//

You got the HTML Code in the String "Text". Now you need to learn HTML.
Search the Internet for SelfHTML. The Information you need is Stored in a
Table. You can find the Pos, then cut the line from the table an extract in
a nother string by only using the commands mid and instr. But it is not as
easy as you might think.

\\
Dim p1, p2 As Integer
p1 = InStr(Text, "Scherbenwelt")
p2 = InStr(Text, "Sonstige")
cuttext = Mid(Text, p1, p2 - p1)

MsgBox(cuttext)
//

Niels Wiederanders


Mar 8 '07 #4
how would this be done on VS 2003? I haven't been able to get VS 2005
to stop crashing; so Im going back to 2003

I just wish MS would hire some goddamn testers; this shouldn't be
thrown onto Developers, Developers, Developers

On Mar 7, 7:29 am, "Niels Wiederanders" <pala...@gmx.dewrote:
Hi Luk,
i need to get a string / some strings from a html source code
(external)

\\
Dim br As New WebBrowser
Dim Text, cuttext As String
br.Navigate("http://wow.buffed.de:80/?c=2170577&tab=8")
While Not br.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
End While

Text = br.DocumentText
//

You got the HTML Code in the String "Text". Now you need to learn HTML.
Search the Internet for SelfHTML. The Information you need is Stored in a
Table. You can find the Pos, then cut the line from the table an extract in
a nother string by only using the commands mid and instr. But it is not as
easy as you might think.

\\
Dim p1, p2 As Integer
p1 = InStr(Text, "Scherbenwelt")
p2 = InStr(Text, "Sonstige")
cuttext = Mid(Text, p1, p2 - p1)

MsgBox(cuttext)
//

Niels Wiederanders

Mar 8 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Alex Hopson | last post by:
I'm trying to read an html file from my local server into a string, I'm using the following code: $attfile = $attachment; //create filenames $file_name = basename ($attfile); $lines =...
1
by: Robizzle | last post by:
I'm writting a script that produces html source code from form input. My problem is that I want to format my html source with new lines and tabs. So, I have a string that holds all the contents...
51
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct...
3
by: Michal A. Valasek | last post by:
Hello, I want to transform text with HTML markup to plain text. Is there some simple way how to do it? I can surely write my own function, which would simply strip everything with < and >....
3
by: Justnew | last post by:
Hei All Can some body help me here: I have a database name Customers, I a trying to connect to SQL server through vb.net using asp.net webform. I want to connect to the server programatically...
20
by: SMG | last post by:
Hi All, I have created an application which is working fine and is in about to launch, now suddenly my mgmt says there are chances that Scrip ID( a particular id and not prim key) may have special...
18
by: William | last post by:
I have the following javascript function that updates a scroll_list and sends the updated entry (with its index) to a server script ( i.e. http://mkmxg00/cgi/confirmUpload.pl ) for further...
8
by: Ben Dewey | last post by:
Anyone, I am trying to do a string replace of a custom Html Tag that is Case Insensitive and Fast, I will be calling this function a bunch of times. Any thoughts about using maybe a...
7
by: denoxis | last post by:
Hi, I have a mystery to solve. It is a mystery because it happens randomly. In the ASP page that is in question, I build a large string (no more than 10K) which is basically an email...
0
marktang
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
tracyyun
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.