Note that there are some explanatory texts on larger screens.

plurals
  1. POMax Value with Substring with HTML Agility Pack
    primarykey
    data
    text
    <p>I can't seem to get this xpath query to work with the HTMLAgilityPack with this code and I was wondering if anyone had any suggestions.</p> <p>This is the query I have so far, but I can't seem to get it to return a number.</p> <pre><code>DocumentNode.GetAttributeValue("max(a[(@class='shackmsg')]/@href/substring-after(.,?id='))", ""); </code></pre> <p>I'm trying to get the <code>MAX</code> value in the <code>href</code> attribute after the <code>=</code> sign on all <code>hrefs</code> with a class of <strong><em>shackmsg</em></strong>.</p> <pre><code>How long is the beta live before it goes retail? No one knows. We do know t&lt;/span&gt; : &lt;/a&gt;&lt;span class="oneline_user "&gt;legsbrogan&lt;/span&gt; &lt;/div&gt; &lt;/li&gt; &lt;li id="item_31218936" class=""&gt; &lt;div class="oneline oneline3 op olmod_ontopic olauthor_189801"&gt; &lt;a class="shackmsg" rel="nofollow" href="?id=31218936" onclick="return clickItem( 31218933, 31218936);"&gt;&lt;span class="oneline_body"&gt;&lt;b&gt;&lt;u&gt;&lt;span class="jt_yellow"&gt;Current Multiplayer Servers&lt;/span&gt;!&lt;/u&gt;&lt;/b&gt; &lt;span class="jt_sample"&gt;&lt;span class="jt_green"&gt;Nighteyes's Japan Server: &lt;/span&gt; &lt;span class="jt_lime"&gt;(PvE)&lt;/span&gt;: &lt;b&gt;211.15.2.34&lt;/b&gt;&lt;/span&gt; &lt;span class="jt_sample"&gt;&lt;span class="jt_green"&gt;zolointo's Canada Server: &lt;/span&gt; &lt;span class="jt_lime"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; : &lt;/a&gt;&lt;span class="oneline_user "&gt;legsbrogan&lt;/span&gt; &lt;/div&gt; &lt;/li&gt; &lt;li id="item_31218938" class="last"&gt; &lt;div class="oneline oneline2 op olmod_ontopic olauthor_189801"&gt; &lt;div class="treecollapse"&gt; &lt;a class="open" rel="nofollow" href="#" onclick="toggle_collapse(31218938); return false;" title="Toggle"&gt;toggle&lt;/a&gt; &lt;/div&gt; &lt;a class="shackmsg" rel="nofollow" href="?id=31218938" onclick="return clickItem( 31218933, 31218938);"&gt;&lt;span class="oneline_body"&gt;Had fun freezing my ass off last night with a bunch of shackers. Not sure who started the big tower we f...&lt;/span&gt; : &lt;/a&gt;&lt;span class="oneline_user "&gt;legsbrogan&lt;/span&gt; &lt;/div&gt; &lt;ul&gt; &lt;li id="item_31218966" class=""&gt; &lt;div class="oneline oneline1 olmod_ontopic olauthor_128401"&gt; &lt;a class="shackmsg" rel="nofollow" href="?id=31218966" onclick="return clickItem( 31218933, 31218966);"&gt;&lt;span class="oneline_body"&gt;wasn't me. I hung out on my ship for a bit listening to your kid play Christmas songs for a bit and then ...&lt;/span&gt; : &lt;/a&gt;&lt;span class="oneline_user "&gt;jonin&lt;/span&gt;&lt;a class="lightningbolt" rel=\"nofollow\" href="http://www.shacknews.com/user/jonin/posts?result_sort=postdate_asc"&gt;&lt;img src="http://cf.shacknews.com/images/bolt.gif" alt="This person is cool!" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;/li&gt; &lt;li id="item_31219008" class="last"&gt; &lt;div class="oneline oneline0 olmod_ontopic olauthor_8618"&gt; &lt;a class="shackmsg" rel="nofollow" href="?id=31219008" onclick="return clickItem( 31218933, 31219008);"&gt;&lt;span class="oneline_body"&gt;haha i heard you guys booby trapped some poor sap's space ship&lt;/span&gt; : &lt;/a&gt;&lt;span class="oneline_user "&gt;Break&lt;/span&gt;&lt;a class="lightningbolt" rel=\"nofollow\" href="http://www.shacknews.com/user/Break/posts?result_sort=postdate_asc"&gt;&lt;img src="http://cf.shacknews.com/images/bolt.gif" alt="This person is cool!" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload