Hello,
i am missing a function to insert or append a Element like this Szenario:
$toInsert=new SimpleDOM('<insertme><manynodes/></insertme>'); $main=new SimpleDOM('<main><something/></main>');
Expected result: <main><something><insertme><manynodes/></insertme></something></main>
Thanks!
Comment #1
Posted on Dec 4, 2010 by Happy KangarooComment deleted
Comment #2
Posted on Dec 4, 2010 by Helpful CamelComment deleted
Comment #3
Posted on Dec 4, 2010 by Swift HippoYou can append nodes using DOM's appendChild(), which is one of the basic DOM methods supported by SimpleDOM:
$main->something->appendChild($toInsert);
Comment #4
Posted on Dec 4, 2010 by Helpful CamelAh okay thanks.. I didnot get that you extend the appendChild function too! Thanks for your help, sorry for troubling you!
Comment #5
Posted on Dec 4, 2010 by Swift HippoNo worries, it's my fault for not providing a half decent documentation ^_^;
If you look into SimpleDOM.php you'll see the list of DOM methods that are directly supported by SimpleDOM. Most of DOMNode and DOMElement methods are supported.
Status: Invalid
Labels:
Type-Enhancement
Priority-Medium