|
Posted by bobzimuta on 03/22/06 20:10
After thinking about it I think I may know why. The formatting works
when writing the intial XML document since it's easy enough for the
write method to know how far into the tree it is, and add the requisite
number of tabs or spaces. But to append the new nodes, it would have to
do some more complicated logic to find out how many tabs/spaces in the
tree the new nodes will be, and go from there. Likely it was lazy
and/or time restricted PHP programmers.
If this is the case, one workaround may be to read in the XML file,
append the nodes, then replace the XML file by creating a new one.
You'll get the nicely formatted tree, though sacrificing speed.
Navigation:
[Reply to this message]
|