Posted by Rob Richards on 12/23/05 13:45
Kenneth Andresen wrote:
> I am having problems with the following functions where my return simply
> is "#text Joe #text Smith #text unknown", it should have read
> firstname Joe lastname Smith address unknown
>
> What am I doing wrong?
You're trying to access the name of the Text node which is always #text
and not it's parent element.
$name = $elem->parentNode->nodeName;
Rob
Navigation:
[Reply to this message]
|