Friday, 6 September 2013

nodeValue complete retrieval

nodeValue complete retrieval

So I am using nodeValue to get the value of a div in PHP using the DOM
commands. The problem is the content of that div also has link like
<a href="www.something.com>Link!!!</a>
and nodeValue does not print href="www.something.com instead it prints
Link!!! is there any way to use the php DOM manulpulation to get all the
atributes of all the html tags in area? So that if the text I was
retreving was
<a href="www.something.com>Link!!!</a>
It would actauly return <a href="www.something.com>Link!!!</a>
I can not specially search for the <a> tag and then get the href value
from that because the content could be varying greatly and there are a lot
of links so it would not be practical(b/c of variation of way link works
and such).

No comments:

Post a Comment