I am trying this as selecting multiple nodes via HtmlAgilityPack but it fails. So, what I am trying to do is collecting a
nodes and li
nodes inside the breadcrumbs div
element.
This is what I tried:
string srxPathOfCategory = "//div[@class='breadcrumbs']//li or //div[@class='breadcrumbs']//a";
var selectedNodes = myDoc.DocumentNode.SelectNodes(srxPathOfCategory);
What is the correct syntax?
Solution is
string srxPathOfCategory = "//div[@class='breadcrumbs']//li[@class='product'] | //div[@class='breadcrumbs']//a";
So for " or " you need to use " | "
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With