I want to catch some data from a website using HtmlAgilityPack.
The data is stored in an object with the property class="addresscolor__"
. But the problem is that there is more than one class with this name. And I want to know is there any way to get this data from a specific class with that value, using "Start with" or "Contained.." or some thing like this ?
HTML Code :
<p class="addresscolor__">
<span>Phone:</span>
33875362 ، 22356341
<br />
</p>
<p class="addresscolor__">
<span>mobile:</span>
09125231827
<br />
</p>
I use thhis code:
HtmlNodeCollection nodes2 = doc.DocumentNode.SelectNodes("//p[@class='addresscolor__']");
The other thing is, that this class contained span tag and with these codes I catch the whole <p>
tag values, but I want a number only in "Mobile" span tag.