ID: 28483 Updated by: [EMAIL PROTECTED] Reported By: vpupkin at comcast dot net -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: Linux Fedora Core 1 PHP Version: 4.3.4 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The "0" field has nothing to do with an element. Every domxml object has this and its dependant upon when the object was created (calling an additional method returning and object would change the order of object creation). Previous Comments: ------------------------------------------------------------------------ [2004-05-22 07:39:11] vpupkin at comcast dot net Description: ------------ a domxml element has "0" field where its unique id lays. When you call a method, those ids change, below is the code to reproduce this. I used this XML string: <?xml version="1.0"?> <test> <row> <col>a</col> <col>b</col> <col>b2</col> </row> <col>c</col> <col>d</col> </test> Reproduce code: --------------- $doc = domxml_open_file('test.xml'); //$element = $doc->first_child(); $xp = $doc->xpath_new_context(); $res = $xp->xpath_eval('//col', $xp); print_r($res->nodeset); Expected result: ---------------- comment/uncomment the 3rd line you'll see that ids change ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28483&edit=1
