Hello, how can I choose all links with the following id?
<a id="List_ctl01_link3" class="content" href=link1.aspx"> <a id="List_ctl02_link3" class="content" href=link2.aspx"> <a id="List_ctl03_link3" class="content" href=link3.aspx"> <a id="List_ctl04_link3" class="content" href=link4.aspx">
and so forth
Please take notice that the last component, "link3," is crucial and must be included in the Xpath.
I'm using HTML Agility Pack and C#.
If you use xpath 2.0, you may utilize regular expressions and the match/matches functions. If you're using xpath 1.0, you'll probably need to create your own custom attribute parser (take a look at xsl:function). According to my research, only xpath 2.0 supports the match function.
Most likely, @id[starts-with(., "List ct") and ends-with(., "link3")] is an alternative method.
Hi how would I select all link when they have the following id
XPath expression to use:
Note: Nothing exists.
inside XPath 1.0. Alternately, use last predicate.