nodeType === XML_TEXT_NODE) {
$nextNode = $node->nextSibling;
if(!$nextNode) {
break;
}
$node = $nextNode;
}
}
private function jumpToPreviousTag(&$node){
while($node && $node->nodeType === XML_TEXT_NODE) {
$previousNode = $node->previousSibling;
if(!$previousNode) {
break;
}
$node = $previousNode;
}
}
public function collectData(){
// Because the LWN page is written in loose HTML and not XHTML,
// Simple HTML Dom is not accurate enough for the job
$content = getContents($this->getURI())
or returnServerError('No results for LWNprev');
$contents = explode('Page editor', $content);
foreach($contents as $content) {
if(strpos($content, '') === false) {
$content = <<
LWN{$content}
EOD;
} else {
$content = $content . '