domxpath

    0热度

    1回答

    我试图从使用php bot的外部网站提取链接。链接在里面 <td class=" title-col"> <a href="http://examplenews101.com/post1">News 1</a> </td> 注意“title-col”前有空格。 这里是脚本进出口使用它无法提取链接 function crawl_page($url, $depth = 5) { static $

    0热度

    1回答

    我正在使用PHP DOM和DOMXPath类。 这是我有什么本质: <table> <tr> <td><div> More data </div></td> </tr> <tr> <td><div> More data </div></td> </tr> <tr> <td><div> More data </di

    0热度

    1回答

    我对此很新。我想使用PHP从页面中提取表格,并在修改所有锚点的HREF值后返回HTML。 下面是表: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1255"> <link rel="s

    2热度

    2回答

    我正在研究从HTML DOM元素获取数据的脚本。 这里是我的代码: <?PHP $url = 'http://www.sportsdirect.com/nike-satire-mens-skate-shoes-242188?colcode=24218822'; libxml_use_internal_errors(true); $doc = new DOMDocument(); $doc-

    0热度

    1回答

    我很困惑如何从我的xpath查询中提取数据。我使用PHP 5.5.6,我得到这个结果: I'm all the countries: DOMNodeList Object ( [length] => 0 ) 1 I'm all the countries: DOMNodeList Object ( [length] => 0 ) 1 I'm all the co

    1热度

    1回答

    $doc = new DOMDocument(); $doc->loadHTMLFile("https://www.tipico.com/en/wettschein/bslc-bVysdHEpshHRDMQ7E-Y5Q%3D%3D/"); $xpath = new DOMXpath($doc); $footer = $xpath->query("//div[@class='t_foot'

    1热度

    2回答

    伙计们我正在解析URL以获取HTML dom元素。 这里是我的代码: <?PHP $url = 'http://www.sportsdirect.com/nike-satire-mens-skate-shoes-242188?colcode=24218822'; libxml_use_internal_errors(true); $dom = new DOMDocument; $dom

    1热度

    1回答

    我需要一些帮助,从外部网页获取内容。 我需要得到一个div,然后从里面删除另一个div。这是我的代码,有人可以帮我吗? 这是我的XML代码中的相关部分: <html> ... <body class="domain-4 page-product-detail" > ... <div id="informacio" class="htab-fragment"> <!

    1热度

    1回答

    我正在使用PHP的DOMDocument的xPath函数。 比方说,我有以下的HTML(来说明我的问题): <span class="price">$5.000,00</span> <span class="newPrice">$4.000,00</span> 第一行始终可用,但在某些情况下,“newPrice级”是在HTML。 我使用了这个xPath-expression,但即使存在另一个

    -2热度

    1回答

    我需要XPath或XQuery中的条件来确定product是否具有节点Id以及该节点是否有数字。 <ns34:Product> <ns34:Id>100</ns34:Id> </ns34:Product> <ns34:Product> <ns34:Id>104</ns34:Id> </ns34:Product>