Re: domxml changes

From: Date: Fri, 31 May 2002 05:55:13 +0000
Subject: Re: domxml changes
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-84616@lists.php.net to get a copy of this message
Forgot to attach the diff for people who are interested. - brad --- brad lafountain <rodif_bl@yahoo.com> wrote: > I was talking before about making changes to domxml. The changes involved > allowing users to create nodes without having a domdocument. > > $node = new DomElement("myNewElement"); > $node->set_content("stuff"); > echo $node->dump_node(); > > it also allows you to create a document in the same way > > $node = new DomDocument("<xml>foo</xml>"); > echo $node->dump_mem(); > > Why I decided to do this is because have have an internal (to my extension) > xml > doc tree that i want userland code to be able to create a node and pass it > into > a function then my extension will attach it to my xml doc tree. The patch > also > lets extension developers create domnodes from the c level with > php_domobject_new(); > > here is a small sample > > xmlNodePtr node; > > node = xmlNewNode(null, "mynode"); > return_value = php_domobject_new(node, &found, NULL); > > > This would create a new php dom node and return it to userland for further > processing. > > > It also removes some duplicate code in xmldocfile. It also moves > DOMXML_API_VERSION to php_domxml.h. > > Compiled and tested on windows and linux. > > There wasn't any objections before when I proposed it so im committing now. > > - Brad > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com

« previous php.dev (#84616) next »