stupid HTML you suck ! HELP PLZ
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Snyper345 wrote:try adding () around it?where? you need to be more detailed -_-
Probable like this, tho I am not good at html lol
Code: Select all
I think this is what Snyper means.<th>Natioal №</th>
<td><strong>(025)</strong></td>
If you can already grab the html file, then I would do it something like this:
First scan all lines of the html (This way doesn't work incase the <td><strong>25</strong></td> isn't in the beginning)
If the line is starting with the td and strong, make a new variable with that line content
Now, make the variable replace all <td> and <strong> (don't forget the </> ones)
This would make it just be the number
Hope that helped someway... I'm currently at my work and cannot provide any code lol
Edited: Fixed some words...
First scan all lines of the html (This way doesn't work incase the <td><strong>25</strong></td> isn't in the beginning)
If the line is starting with the td and strong, make a new variable with that line content
Now, make the variable replace all <td> and <strong> (don't forget the </> ones)
This would make it just be the number
Hope that helped someway... I'm currently at my work and cannot provide any code lol
Edited: Fixed some words...
Hmm, your idea might seem to work, since thats the number with a "strong" around it, so i guess it should be easy to scan
but yeah, after work please try to see if you can find the version of what your talking about : )
but yeah, after work please try to see if you can find the version of what your talking about : )
You can use this:
Code: Select all
Dim elements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("strong")
Label3.Text = elements(0).InnerText
mandai wrote:You can use this:Mandai you are awesome !Code: Select allDim elements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("strong") Label3.Text = elements(0).InnerText
i would of never thought about that -__-
but thank you : ))
but lets say it wouldn't have a "strong" around it.. lets say it was this:
Code: Select all
how would i display the "50%male" part in a label ?<th>Gender</th>
<td><span class="gender-male">50% male</span>,
<span class="gender-female">50% female</span></td>
</tr>
You can use similar code to the above, just change it to GetElementsByTagName("span").
mandai wrote:You can use similar code to the above, just change it to GetElementsByTagName("span").I fiqured it was something like that
but the thing is, "span" is used for the once. so how would i get it to find the right "span" ??
is it possible to locate it by line ?
Copyright Information
Copyright © Codenstuff.com 2020 - 2023