[phpXML] Bug in setAttributes
Brought to you by:
bs_php,
nigelswinson
From: <nig...@us...> - 2001-10-08 17:14:34
|
RE: [phpXML] Bug in setAttributesAfter using setAttributes ($xml->setAttrib= utes("/users[1]/Nodename[1]",array("atr1","atr2"));) I get the following in= correct result: <Nodename 0=3D"atr1" 1=3D"atr2"/>=20 Where do the 0 and 1 come from?=20 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 =3D>= "atr1", 1 =3D> "atr2"));) Hence you end up with: <Nodename 0=3D"atr1" 1=3D"atr2"/> Try: setAttributes ($xml->setAttributes("/users[1]/Nodename[1]",array("atr1"= =3D> "value1", "atr2" =3D> "value2"));) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb -- This message has been sent through the <phpXML/> user discussion list. To u= nsubscribe, please visit https://sslsites.de/mailinglisten/user/user@lists.= phpxml.org/ |