Click here to Skip to main content
15,744,010 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Suppose the user is giving the left1 value as 54.00 means, How can i get this .pstyle251x63 value as a output?

Html File like,
.pstyle251x63{text-indent: 0; marginsizeleft: 0;marginsizefirst: 0;marginsizeright: 0;Leading: 22.5;position1: absolute; left1: 54.00; top1: 47.80; width1: 58.84; height1: 22.50; z-index1: 10063;pagewidth1: 343.00; pageheight1:552.00;}

Using HTML Agility pack, i need to get this .pstyle251x63 value?
Updated 14-Dec-11 17:53pm

1 solution

static void Main(string[] args)
HtmlAgilityPack.HtmlWeb web = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = web.Load("");
//System.Console.WriteLine(doc.DocumentNode.SelectSingleNode("//*[@id=\"lst-ib\"]").Id); //This is not working as well
foreach (HtmlNode link in doc.DocumentNode.SelectNodes("//*[@id=\"gbw\"]"))
HtmlAttribute att = link.Attributes["id"];



Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900