|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-07-05 08:51 UTC] peter at wingercom dot net
[2001-07-06 04:44 UTC] peter at wingercom dot net
[2001-11-29 07:42 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 12:00:01 2025 UTC |
Hi, When using default namespace in the XML (XHTML) source xpath_eval will not return any result except with the request "//*" whereby it will return the whole XML source. When making another namespace than "xmlns" everything works fine. // The xpaht_eval() will NOT work with this line $xhtml = '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>hummmm......</title></head><body></body></html>'; // The xpaht_eval() will work with this line $xhtml = '<html BUGxmlns="http://www.w3.org/1999/xhtml"><head><title>hummmm......</title></head><body></body></html>'; $doc = xmldoc($xhtml); $ctx = xpath_new_context($doc); $node = xpath_eval_expression($ctx,"//title"); var_dump($node->nodeset);