I have something like this
<div class='mainclass subclass1' quest-id='123'> </div>
<div class='mainclass subclass2' quest-id='234'> </div>
<input quest-id='3236'> </input>
<textarea quest-id='256'> </textarea>
I want the quest-d
of all div which belongs to class named subclass1
, subclass2
and quest-id
of all input and textarea. How can i do it using html agility pack in c#?
and i have c# code like this:
HtmlDocument document = new HtmlDocument();
document.LoadHtml(obj.NewPage.Content);
HtmlNode htmlRootElement = document.DocumentNode.SelectSingleNode("/html");
HtmlNode bodyElement = htmlRootElement.SelectSingleNode("body");
i dont know how to proceed