Pesquisar na Comunidade
Mostrando resultados para as tags ''xpath''.
Encontrado 1 registro
-
Eu queria pegar uma div especifica e não todas, como o código está pegando ex: O66280 - BSB - 21:50 - 21:50 - 1- PREVISTO Eu tentei com Xpath mas não deu certo. <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /> </head> <body> <?php $WebSite = 'https://portoalegre-airport.com.br/pt'; $DOMDocument = new DOMDocument( '1.0', 'utf-8' ); $DOMDocument->preserveWhiteSpace = false; @$DOMDocument->loadHTML( file_get_contents( $WebSite ) ); echo utf8_decode( $DOMDocument->getElementsByTagName( 'div' )->item(0)->nodeValue ); ?> </body> </html>
- 1 resposta
-
- php
- javascript
-
(e %d mais)
Tags: