منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : الى خبراء HtmlAgilityPack كيف استطيع استخراج جميع Form من صفحة html
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم ورحمة الله وبركاته
انا استخدم كلاس htmlagilitypack لتعامل مع صفحات html
عندي مشكلة وماني عارف لها حل!
وهي كيف استخدم الكلاس لأخراج جميع Form>  الموجوده في الصفحة مع عناصرها  مثل input,textarea etc
هذه هي محاولتي لأستخراج الفورم مع جميع عناصره لكن للأسف ان الفورم لا يظهر عناصره فقط يظهر لي اسم الفورم

كود :
<form action="register.php?do=checkdate" method="post" onsubmit="return checkform(this)">

كود :
Try
           Dim Web As New System.Net.WebClient
           Dim htdoc As New HtmlAgilityPack.HtmlDocument
           Dim page As String = ""
           page = Web.DownloadString("http://test.com/student/register.php")
           htdoc.LoadHtml(page)
           For Each item As HtmlNode In htdoc.DocumentNode.Descendants("form")
                   MsgBox(item.OuterHtml)
           Next

       Catch ex As Exception
       End Try
هذا كود يوجد به اكثر من Form لتجربة

كود :
<HTML>
<BODY>
<STRONG>TEST</STRONG>
<STRONG>TEST</STRONG>
<STRONG>TEST</STRONG>
<form action="register.php?do=checkdate" method="post" onsubmit="return checkform(this)">
<input type="hidden" name="do" value="checkdate">
<input type="hidden" name="s" value="X">
<input type="hidden" name="securitytoken" value="guest">
<input type="hidden" name="url" value="https://www.google.com/">
</form>
<STRONG>TEST</STRONG>
<STRONG>TEST</STRONG>
<STRONG>TEST</STRONG>
<form action="index.php" method="get" style="clear:left">
<td class="tfoot" align="right" width="100%">
       <div class="smallfont">
           <strong>
               <a href="https://support.test.com/?s=5413e493b8e32114ba2ff4d2e038ace3" rel="nofollow" accesskey="9">Contact Us</a> -
               <a href="http://store.test.com/">Steam Store</a> -

           <a href="archive/index.php">Archive</a> -
               <a href="http://store.test.com/privacy_agreement/">Privacy Statement</a> -
               <a href="http://store.test.com/subscriber_agreement/">Terms of Service</a> -
               <a href="#top" onclick="self.scrollTo(0, 0); return false;">Top</a>
           </strong>
       </div>
</td>
</form>
<STRONG>TEST</STRONG>
<STRONG>TEST</STRONG>
<STRONG>TEST</STRONG>
<form id="searchform" name="searchform" method="get" action="http://store.test.com/search/" onsubmit="return SearchSuggestCheckTerm(this);">
</form>
</BODY>
</HTML>