开发者

Parsing out a hidden field inside iframe using HtmlAgilityPack .NET

I'm having problems picking out data I need that's inside an iframe form. Is it even possible using Html开发者_运维百科AgilityPack? Here's a screenshot using Firebug so it's easier for you guys to see.

http://i.stack.imgur.com/ftt84.jpg

I need to parse out the post_form_id. I've tried

var value = doc.DocumentNode.SelectSingleNode("//input[@type='hidden' and @name='post_form_id']")
        .Attributes["value"].Value;

but obviously won't work because it's inside the iframe form. Appreciate any help.


I would

  1. Use the HTMLAglityPack to find the iframe location
  2. Use the System.URI class find the absolute link of the iframe page
  3. Open this iframe page
  4. Use HTMLAglityPack again on the iframe page to find the required information
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜