EDN Admin
Well-known member
Hi Guys
I have a camera that count number of people enter the building and I need to parse that count to a webbrowser control. I can already see the count from the camera browser but I dont need the animation video. here is the code from
fire bug. I got nothing when I run the code. I need to inject the count-in/out value to a textbox. I appreciate your help
<div id="x_16" style=" <span class="x_nodeBox" style="color:#ffffff <span class="x_nodeTag" style="color:#ffffff body <span class="x_nodeName" style="color:#ffffff id="<span class="x_nodeValue" style="color:#ffffff; font-weight:normal livecount
<div style="
<div id="x_17" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox x_nodeHidden" style="color:#888888 <<span class="x_nodeTag" style="color:#5f82d9 section <span class="x_nodeName" style="color:#888888 id="<span class="x_nodeValue" style="color:#d86060; font-weight:normal errors" <span class="x_nodeName" style="color:#888888 style="<span class="x_nodeValue" style="color:#d86060; font-weight:normal display:
none;
<div id="x_19" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue div <span class="x_nodeName id="<span class="x_nodeValue" style="color:#ff0000; font-weight:normal container
<div style="
<div id="x_20" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue h1><span class="x_nodeText" style="margin:0px 2px; font-family:Monaco,monospace; color:#333333; vertical-align:top TrueView People Counter™</<span class="x_nodeTag" style="color:blue h1>
<div id="x_21" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue h2><span class="x_nodeText" style="margin:0px 2px; font-family:Monaco,monospace; color:#333333; vertical-align:top 414_Main Entrance</<span class="x_nodeTag" style="color:blue h2>
<div id="x_22" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue table <span class="x_nodeName id="<span class="x_nodeValue" style="color:#ff0000; font-weight:normal count
<div style="
<div id="x_23" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue thead>
<div id="x_29" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue tbody>
<div style="
<div id="x_30" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue tr>
<div style="
<div id="x_31" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue td <span class="x_nodeName id="<span class="x_nodeValue" style="color:#ff0000; font-weight:normal count-in <span class="x_nodeText" style="margin:0px 2px; font-family:Monaco,monospace; color:#333333; vertical-align:top 2495</<span class="x_nodeTag" style="color:blue td>
<div id="x_32" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue td <span class="x_nodeName id="<span class="x_nodeValue" style="color:#ff0000; font-weight:normal count-out <span class="x_nodeText" style="margin:0px 2px; font-family:Monaco,monospace; color:#333333; vertical-align:top 407</<span class="x_nodeTag" style="color:blue td>
<div style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088 </<span class="x_nodeTag" style="color:blue tr>
<div style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
</<span class="x_nodeTag" style="color:blue tbody>
<span class="x_nodeTag" style="color:blue
<span class="x_nodeTag" style="color:blue My code :
<pre class="prettyprint lang-vb Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.WebBrowser3.Navigate("http://10.XX.XX.XX/people-counter/lite/count.html"
END SUB
Private Sub WebBrowser3_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser3.DocumentCompleted
Dim tTABLES As HtmlElementCollection = Me.WebBrowser3.Document.GetElementsByTagName("table")
For Each TBL As HtmlElement In tTABLES
For Each ROW As HtmlElement In TBL.All
For Each CELL As HtmlElement In ROW.All
TextBox1.Text = CELL.GetAttribute("value")
Next
Next
Next
End Sub[/code]
<br/>
<span class="x_nodeTag" style="color:blue
<span class="x_nodeTag" style="color:blue
View the full article
I have a camera that count number of people enter the building and I need to parse that count to a webbrowser control. I can already see the count from the camera browser but I dont need the animation video. here is the code from
fire bug. I got nothing when I run the code. I need to inject the count-in/out value to a textbox. I appreciate your help
<div id="x_16" style=" <span class="x_nodeBox" style="color:#ffffff <span class="x_nodeTag" style="color:#ffffff body <span class="x_nodeName" style="color:#ffffff id="<span class="x_nodeValue" style="color:#ffffff; font-weight:normal livecount
<div style="
<div id="x_17" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox x_nodeHidden" style="color:#888888 <<span class="x_nodeTag" style="color:#5f82d9 section <span class="x_nodeName" style="color:#888888 id="<span class="x_nodeValue" style="color:#d86060; font-weight:normal errors" <span class="x_nodeName" style="color:#888888 style="<span class="x_nodeValue" style="color:#d86060; font-weight:normal display:
none;
<div id="x_19" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue div <span class="x_nodeName id="<span class="x_nodeValue" style="color:#ff0000; font-weight:normal container
<div style="
<div id="x_20" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue h1><span class="x_nodeText" style="margin:0px 2px; font-family:Monaco,monospace; color:#333333; vertical-align:top TrueView People Counter™</<span class="x_nodeTag" style="color:blue h1>
<div id="x_21" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue h2><span class="x_nodeText" style="margin:0px 2px; font-family:Monaco,monospace; color:#333333; vertical-align:top 414_Main Entrance</<span class="x_nodeTag" style="color:blue h2>
<div id="x_22" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue table <span class="x_nodeName id="<span class="x_nodeValue" style="color:#ff0000; font-weight:normal count
<div style="
<div id="x_23" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue thead>
<div id="x_29" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue tbody>
<div style="
<div id="x_30" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<div style="
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue tr>
<div style="
<div id="x_31" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue td <span class="x_nodeName id="<span class="x_nodeValue" style="color:#ff0000; font-weight:normal count-in <span class="x_nodeText" style="margin:0px 2px; font-family:Monaco,monospace; color:#333333; vertical-align:top 2495</<span class="x_nodeTag" style="color:blue td>
<div id="x_32" style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
<span class="x_nodeBox <<span class="x_nodeTag" style="color:blue td <span class="x_nodeName id="<span class="x_nodeValue" style="color:#ff0000; font-weight:normal count-out <span class="x_nodeText" style="margin:0px 2px; font-family:Monaco,monospace; color:#333333; vertical-align:top 407</<span class="x_nodeTag" style="color:blue td>
<div style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088 </<span class="x_nodeTag" style="color:blue tr>
<div style="padding-bottom:1px; font-family:Monaco,monospace; color:#000088
</<span class="x_nodeTag" style="color:blue tbody>
<span class="x_nodeTag" style="color:blue
<span class="x_nodeTag" style="color:blue My code :
<pre class="prettyprint lang-vb Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.WebBrowser3.Navigate("http://10.XX.XX.XX/people-counter/lite/count.html"
END SUB
Private Sub WebBrowser3_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser3.DocumentCompleted
Dim tTABLES As HtmlElementCollection = Me.WebBrowser3.Document.GetElementsByTagName("table")
For Each TBL As HtmlElement In tTABLES
For Each ROW As HtmlElement In TBL.All
For Each CELL As HtmlElement In ROW.All
TextBox1.Text = CELL.GetAttribute("value")
Next
Next
Next
End Sub[/code]
<br/>
<span class="x_nodeTag" style="color:blue
<span class="x_nodeTag" style="color:blue
View the full article