This project has moved and is read-only. For the latest updates, please go here.

I can not get <embed > tag

Apr 20, 2013 at 9:29 AM
Edited Apr 20, 2013 at 9:31 AM
 <div id="player_trailer" class="c_trailer" align="center">
<embed id="template" width="600" height="340" flashvars="ytlink=ZKw8qMS67bo&friendly=oblivion-digital-&videotitle=B%c3%ad+M%e1%ba%adt+Tr%c3%a1i+%c4%90%e1%ba%a5t+Di%e1%bb%87t+Vong+(Digital)" allowscriptaccess="always" wmode="transparent" allowfullscreen="true" quality="high" bgcolor="#FFFFFF" name="template" style="" src="/flash/bigtrailerplayer.swf" type="application/x-shockwave-flash">
how away to i get Atribute of <embed> tag?
i use Html Agility Pack 4.5.

please help me
Apr 21, 2013 at 11:29 AM
What have you tried to do? Could you please provide some code samples?
Apr 21, 2013 at 3:16 PM
i tried :
private string LinkYouBeMegaStar()
             var hw = new HtmlWeb();
            HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
            doc = hw.Load("");         
            HtmlNode embed_tag = doc.DocumentNode.SelectSingleNode("//div[@class='c_trailer']");
           HtmlNode embed = embed_tag.SelectSingleNode("embed[@id='template']");     
             return  embed.InnerText;
error : "Object reference not set to an instance of an object."
Apr 22, 2013 at 8:10 AM
Does the statement: HtmlNode embed_tag = doc.DocumentNode.SelectSingleNode("//div[@class='c_trailer']") returns a non null value for embed_tag?
Apr 22, 2013 at 11:42 AM
i tried get embed_tag .Atributtes["id"].value. (value="player_trailer");
Apr 22, 2013 at 12:33 PM
Did you try embed.InnerHtml instead of embed.InnerText?