ID: 11903
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: DOM XML related
Operating system: FreeBSD 4.3
PHP Version: 4.0.6
Description: xpath_eval does not work with default namespace.

I forgot again....

libxml version: 2.3.10
iconv version: 2.0

Previous Comments:

[2001-07-05 08:51:13] [EMAIL PROTECTED]

I forgot.

This namespace decleration will also work with xpath_eval
<html xmlns:thisworks="";>


[2001-07-05 08:44:09] [EMAIL PROTECTED]

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 

    // The xpaht_eval() will work with this line
    $xhtml = '<html 

    $doc = xmldoc($xhtml);
    $ctx = xpath_new_context($doc); 
    $node = xpath_eval_expression($ctx,"//title");


Full Bug description available at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to