Simplified HTML

&lt;tr&gt;
&lt;td class="orderOverviewAnotherColumn"&gt;0177-4066356&lt;/td&gt;
&lt;a name="orderTableSorted:orderTable:10:j_id504" id="orderTableSorted:orderTable:10:j_id504" href="#"&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="orderOverviewAnotherColumn"&gt;0177-4066357&lt;/td&gt;
&lt;a name="orderTableSorted:orderTable:11:j_id504" id="orderTableSorted:orderTable:11:j_id504" href="#"&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="orderOverviewAnotherColumn"&gt;0177-4066358&lt;/td&gt;
&lt;a name="orderTableSorted:orderTable:12:j_id504" id="orderTableSorted:orderTable:12:j_id504" href="#"&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="orderOverviewAnotherColumn"&gt;0177-4066359&lt;/td&gt;
&lt;a name="orderTableSorted:orderTable:13:j_id504" id="orderTableSorted:orderTable:13:j_id504" href="#"&gt;
&lt;/tr&gt;


Using the following Code in PHP

libxml_use_internal_errors(true);
$doc = new DOMDocument();
$doc-&gt;loadHTMLFile('448713409.html');
$xpath = new DOMXPath($doc);
$vRes = $xpath-&gt;query(".//*[@id='orderTableSorted:orderTable:tbody_element']/tr[contains(.,'4066356')]//a[contains(@id,':j_id504')]/@ID");

foreach ($vRes as $obj) {
    $clean[] = $obj-&gt;nodeValue;
}

$clink = implode(" ",$clean);
var_dump($clink);


returns...

string(0) ""


Using Firebug Xpath Checker it returns the ID "orderTableSorted:orderTable:10:j_id504" which i need to find.

Any Help in the right direction is much appreciated.


Question: What is the Goal of "Hot Network Questions"?
Answer: TL;DR: What else are we expected to vote down and close at Workplace and Programmers?

After discovering that one of the answers reflects my own position quite closely I wasn't going to go out on a limb but since a suggestion was made...


  ...Guess what: if your site is full of crappy questions, your site sucks - even if they're not highly-ranked by your own users, folks are finding them via Google, and that's where the vast majority of your readers are coming from. You can work to fix that - as painful as that process is - or you can bury your head in the sand and blame it on all of those stupid people from elsewhere. If you think "hot" questions are a serious problem for your site's quality, then you're already ignoring a much bigger problem. Blaming someone else is easy and fun for the whole family - but it doesn't fix anything.


...I would like to address that.

I participate in two sites that suffer from overly hot questions: Programmers and Workplace. In my experience, communities at these sites close inappropriate questions pretty fast, which wipes them from hot list and makes it not an issue.

Questions that really suffer from senseless over-exposure are reasonable ones, those that match site quality requirements and don't deserve closure, nor even downvotes, neither from passers by nor from community regulars.

The only remaining way to "fix" these questions, if one takes above suggestion seriously, is to cast unfair down and close votes. However pragmatic it may sound, I believe that this is a fundamentally wrong way, as it suggests bending community morale as a workaround for feature that just poorly implements specification.



Frankly, I feel quite embarrassed to see this suggested by a community manager. It feels like being told by a police officer "hey it's your fault of being robbed because you did't carry AK-47".

Oh and please spare me of extending this analogy to mumbling about dangerous districts, abandoned by law, where one would better enter armed. If a particular district of Stack Exchange City turns out broken and abandoned, there are known ways to stop the disorder and add a discipline, without letting the damage spread over and promote itself in the hot news.