I can not get <embed > tag

Apr 20, 2013 at 8:29 AM
Edited Apr 20, 2013 at 8: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">
</div>
how away to i get Atribute of <embed> tag?
i use Html Agility Pack 4.5.

please help me
thank
Apr 21, 2013 at 10:29 AM
What have you tried to do? Could you please provide some code samples?
Apr 21, 2013 at 2:16 PM
i tried :
private string LinkYouBeMegaStar()
        {
             var hw = new HtmlWeb();
            HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
            doc = hw.Load("http://www.megastar.vn/vn/saving-general-yang-digital-");         
            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 7: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 10:42 AM
yes!
i tried get embed_tag .Atributtes["id"].value. (value="player_trailer");
Apr 22, 2013 at 11:33 AM
Did you try embed.InnerHtml instead of embed.InnerText?