Page 1 of 1

domxml issues

Posted: Fri Feb 01, 2008 11:01 am
by mcmcom
if i have this code

Code: Select all

 
foreach ($childNodes as $value) {
    $tmp = $doc->create_element($value->tagname);
    $block->append_child($tmp);
}
 
it creates an element named $tmp which has the proper node name. but i have NO idea how to get the text associated with it.

ex:
original node
<sm>this is some text</sm>

new node
<sm/>

so i need to get the text and put it in there. how can i do that?
thanks,
mcm