[phpXML] RE: [phpXML] Bug in setAttributes
Brought to you by:
bs_php,
nigelswinson
From: <o.t...@ab...> - 2001-10-08 17:37:57
|
Thanks all folks, Oliver -----Original Message----- From: nig...@us... [mailto:nig...@us...] Sent: woensdag 26 september 2001 13:37 To: us...@li... Subject: [phpXML] Bug in setAttributes After using setAttributes ($xml->setAttributes("/users[1]/Nodename[1]",array("atr1","atr2"));) I get the following incorrect result: <Nodename 0="atr1" 1="atr2"/> Where do the 0 and 1 come from? The array that you use for setAttributes should be an associative array, so you are effectively doing: setAttributes ($xml->setAttributes("/users[1]/Nodename[1]",array(0 => "atr1", 1 => "atr2"));) Hence you end up with: <Nodename 0="atr1" 1="atr2"/> Try: setAttributes ($xml->setAttributes("/users[1]/Nodename[1]",array("atr1" => "value1", "atr2" => "value2"));) =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb <http://www.sourceforge.net/projects/phpxmldb> -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |