HtmlAgilityPack selecting nodes with end different

682 views Asked by At

I've this code...

<td class="alt1" id="td_threadtitle_335784">
<td class="alt1" id="td_threadtitle_342222">
<td class="alt1" id="td_threadtitle_554213">
<td class="alt1" id="td_threadtitle_31226">
<td class="alt1" id="td_threadtitle_9442">

The question is...

How can i use the selectnodes or other function to select the ID's...

I try -

foreach (HtmlNode n in doc.DocumentNode.SelectNodes("//a[@id='td_threadtitle_']"))

But the numbers in the end are $%@# Everthing...

[]'s

1

There are 1 answers

0
L Nathan On

[SOLVED] I want to select only td_threadtitle_

Then i use This...

  `("//a[starts-with(@id,'thread_title_')]")`

Works Great!

This code i see here too..

Thanks for the