منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
Get the first element of specific tagname - HtmlElement - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : Get the first element of specific tagname - HtmlElement (/showthread.php?tid=42507)



Get the first element of specific tagname - HtmlElement - Basil Abdallah - 19-09-22

مرحبا 
استعملت الhtml element للحصول على بيانات من موقع معين 
ولكن المشكله انو الكلاس الاساسي تبع المعلومات يحتوي على تفرعات انا ما بدي اياها 
الصورة هاي توضح الي بدي اياه:


كيف اقدر احصل على البيانات او الاكواد الموجودة بالpostbody من غير clear وsignature_div 
هاذ الكود الي استعملته لحتى استخرجت بيانات Postbody 
PHP كود :
For Each ss In webbrowser1.Document.GetElementsByTagName("div")
 
                If ss.GetAttribute("ClassName") = "postbody" Then

                     topicextract
.text ss.innerhtml
                     o 
+= 1

                 End 
If
 
            Next 



RE: Get the first element of specific tagname - HtmlElement - ابو روضة - 20-09-22

أعتقد تغير هذا

innerhtml

بهذا 

innertext

أو بهذا

PHP كود :
For Each ss In webbrowser1.Document.GetElementsByTagName("div")
 
                If ss.GetAttribute("ClassName") = "postbody" Then

                     topicextract
.text ss.GetAttribute("ClassName")
 
                    o += 1

                 End 
If
 
            Next