domxml issues
Posted: Fri Feb 01, 2008 11:01 am
if i have this code
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
Code: Select all
foreach ($childNodes as $value) {
$tmp = $doc->create_element($value->tagname);
$block->append_child($tmp);
}
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