RE: [PEAR] XML_Tree/insertChild

From: Date: Tue, 25 Feb 2003 09:43:09 +0000
Subject: RE: [PEAR] XML_Tree/insertChild
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3941@lists.php.net to get a copy of this message
We had to use a patch to insertchild here to make it work properly In node.php if (is_object($child)) { - if (strtolower(get_class($child)) == 'xml_tree_node') { + $type = strtolower( get_class($child)); + + if ($type != 'xml_tree') { $this->children[$index] = $child; } - if (strtolower(get_class($child)) == 'xml_tree' && isset($child->root)) { + if ($type == 'xml_tree' && isset($child->root)) { $this->children[$index] = $child->root->get_element(); - } - } else { + } + } else { $this->children[$index] = new XML_Tree_Node($child, $content, $attributes); } I didn't quite get why but the guy i'm working with had to change this to create a docbook xml file. Arnaud. > Hi, > > has anybody used XML_Tree::insertChild before? The > API-Description is far > from beeing understandable. If someone has a working example > I would really > be thankful! > > Greetings, Arash > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.pear.general (#3941) next »