my ($node) = $dom->findnodes('/doc/text'); my $string = $node->toString; print "toString:\n$string\n"; # remove enclosing tags $string =~ s/^<[^>]+>//; $string =~ s/<[^>]+>$//; print "toString:\n$string\n"; #### toString: From mobile, dial this number: toString: From mobile, dial this number: