Quantcast
Viewing all articles
Browse latest Browse all 655

New Post: Selecting node based on attribute / removing unknown attributes

I have tried a simple version and it seems to work. can we get a code sample to see whats happening.
            hp.LoadHtml("<tr id=\"test\">sdf<td>5</td>    <td name=\"tess\" ><span id=\"me\">Fifth street</span></td></tr>");

            var tr = hp.DocumentNode.SelectNodes("//*[not(@id | @name)]");
this will return only 1 item in the collection that is a td with the innerText = 5 as expected.

Think something else might be the issue.

Regards,

Lee

Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>