|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-24 00:10 UTC] rrichards@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 11:00:02 2025 UTC |
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