Bug #14500 Updated: Undefined property: name
| From: | mfischer@php.net | Date: | Fri, 14 Dec 2001 04:04:06 +0000 |
| Subject: | Bug #14500 Updated: Undefined property: name | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-73654@lists.php.net to get a copy of this message | ||
ID: 14500
Updated by: mfischer
Reported By: agnieszkak@pi.net.pl
Old Status: Open
Status: Closed
Bug Type: DOM XML related
Operating System: Slackware 8.0
PHP Version: 4.1.0
New Comment:
The interface has changed, the property is now named 'tagname'.
print_r($root) is your friend if you can't find what you're searching for (and the source
of course).
Closing.
Previous Comments:
------------------------------------------------------------------------
[2001-12-13 18:55:11] agnieszkak@pi.net.pl
I've compiled PHP-4.1.0 with libxml2-2.4.2 on linux machine
with that options:
/configure --with-apache=../apache_1.3.22 --enable-trans-sid --with-mysql=/mysql
--disable-magic-quotes --with-dom --with-qtdom --with-zlib --with-png
--with-ttf --enable-safe-mode --enable-track-vars --with-xml
When I trie to use any domxml functions (below a part of php code taken from manual) I get error in
my php_error_log
like this:
"Undefined property: name in example.php"
"Undefined property: name in example.php"
// data file
$str = "<?xml version=\"1.0\"?><me><name>Joe
Cool</name><age>24</age><sex>male</sex></me>";
// create a document object
$dom = xmldoc($str);
// get reference to root node
$root = $dom->root();
// get name of node - "me"
echo $root->name;
// get children of node, as array
$children = $root->children();
I checked the same script with older version of php (4.0.6)and libxml2 (2.2.3) and it works.
Any ideas what I do wrong?
Agnieszka Kukalowicz
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14500&edit=1