#29426 [NoF-Csd]: Incomplete/inconsistent functionality

2005-02-22 Thread php at peterrobins dot co dot uk
 ID:   29426
 User updated by:  php at peterrobins dot co dot uk
 Reported By:  php at peterrobins dot co dot uk
-Status:   No Feedback
+Status:   Closed
 Bug Type: SimpleXML related
 Operating System: Linux 2.4
 PHP Version:  5.0.0
 New Comment:

I have now revisited this using 5.0.3. Adding a node still  
doesn't work, but the manual page no longer claims that it  
does! Because of this, I've changed the status to closed.  
However, the manual page is still misleading, as it says 
(Example 7) The object allows for manipulation of all of 
its elements which is not really true. There are many 
limitations, as stated in this bug report and in the 
comment from brcavanagh, which says much the same thing. 
I'd suggest the manual page be updated to specify that 
SimpleXML is primarily for reading and simple updates, and 
is not really intended for more complex updating or 
deletion of nodes/nodesets.


Previous Comments:


[2005-02-22 01:00:08] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2005-02-15 00:33:45] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2004-10-06 07:14:06] matt dot bevan at marginsoftware dot com

I am also in the position where I need to be able to 
create and insert a SimpleXMLElement before or after an 
arbitrary SimpleXMLElement, then remove the previous 
instance.  This is to move XML elements from one location 
in an XML file into another. 
 
I'll likely be switching to/from a DOM object to 
accomplish this, however.



[2004-09-19 17:40:18] phpbugs at ilibi dot com

Either the documentation for simplexml should be 
clarified about exactly what can and can not be added/
edited. Or the ability to add nodes should be added to 
simplexml.



[2004-08-08 01:18:36] cyberlot at cyberlot dot net

Confirming this bug exists, Have the same problem, I need to add to a
simplexml object on the fly and can't



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29426

-- 
Edit this bug report at http://bugs.php.net/?id=29426edit=1


#29426 [NEW]: Incomplete/inconsistent functionality

2004-07-28 Thread php at peterrobins dot co dot uk
From: php at peterrobins dot co dot uk
Operating system: Linux 2.4
PHP version:  5.0.0
PHP Bug Type: SimpleXML related
Bug description:  Incomplete/inconsistent functionality

Description:

According to the manual page, you can add a node with 
SimpleXML, but this does not seem to work, either as  
$xml-movie[0]-characters[0]-character[0]-age = '21'; 
nor as 
$xml-movie[0]-rating[2] = 'not bad'; 
 
Deletion works on attributes 
unset($xml-movie[0]-rating[1]['type']); 
but at node level, deletes all  
unset($xml-movie[0]-rating); 
This is inconsistent with reading where 
$xml-movie[0]-rating 
fetches the first node only. 
unset($xml-movie-rating); 
deletes all ratings for the 1st movie only. 
It does not appear possible to delete just 1 node 
unset($xml-movie[0]-rating[1]); 
 
Because objs are now refs not copies, can do this 
$rat = $xml-movie[0]-rating[0]; 
$rat['name'] = 'judge'; 
but not this 
$rat = 'new content'; 
nor this 
$rat-child[0] = 'new rating'; 
and if I try and do 
$rat-child = 'new rating'; 
I get 'Attempt to assign property of non-object' 
 


-- 
Edit bug report at http://bugs.php.net/?id=29426edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29426r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29426r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29426r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29426r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29426r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29426r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29426r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29426r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29426r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29426r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29426r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29426r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29426r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29426r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29426r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29426r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29426r=float