On Mon, May 06, 2002 at 03:54:34PM +0200, Christian Stocker wrote: > > $doc = new DomDocument("some.file", true); > > $ele = new DocElement("name"); > > $doc->append_child($ele); > > as i said before, this is not according to the DOM-Standard, so i would > rather prefer not to include this kind of behaviour, but i'd like to hear > other opinions about that....
wrt. to using the new operator to create "orphaned" nodes, i dont care. one might argue, that it makes the thing more consistent, but we've already had a lot of fun with discussions about consistency before :) wrt. to creating nodes without using a document's factory let me point out the following. with the current api i can already create a node this way: $n = domxml_node('root'); and i've always found that very appealing; what was (is?) missing ar the functions to create all other types of nodes this way... i want to be able to assemble the xml pieces (docs, nodes, trees) the way i like it and in the order i find appropriate. i dont need a document to have some node flying around in memory, as the dom-spec tries to tell me. i find it convenient that i can happily assemble a whole subtree inside a function, return that subtree and have the caller do whatever it wants with it (attach it, modify it, delete it). regards, -lukas -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php