I only can think in two solutions:
a) blabla.snapshotItem(0).parent.innerHTML but this will give you also the code of other childs.
b) reconstruct the element.
var tag = "";
var temp = blabla.snapshotItem(0);
tag += "<"+temp.nodeName+" ";
for (var i = 0; i < temp.attributes.length; i++)
tag += temp.attributes[0].nodeName+"='"+temp.attributes[0].nodeValue+"' ";
tag += "> "+temp.innerHTML+"</"+temp.nodeName+">";
On 4/27/06, Renato R. (RRaver) <
[EMAIL PROTECTED]> wrote:
Hi guys,
I need a way to return the full node of a XPATH result, but I don't know how or even if it is possible.
For example, if I try something like this,
<a href="">http://www.site.com">This is a Link</a>
.......
<script>
.....
var blabla = document.evaluate("//a", document, null, 7,null);
blabla.snapshotItem(0) will return "This a Link" and blabla.snapshotItem(0).href will return "http://www.site.com" and so on... But what I really need is a way to return exactly "<a href="" href="http://www.site.com" target="_blank" >http://www.site.com">This is a Link</a>" that is the matched node.
Is possible to do it? I've tried somethings like nodeValue e things like that but none of them worked.... Someone can help-me?
Thanks for the attention
--
Renato Rodrigues
http://www.renatorodrigues.com
http://orkutbar.mozdev.org
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners
--
Hasta Otra
Ramiro Aparicio
---------------------------------------------------------------------------------
Webmaster de http://gs151.tk y http://www.climaxsl.es
Desarrollador de FoxGame http://foxgame.mozdev.org
_______________________________________________ Project_owners mailing list [email protected] http://mozdev.org/mailman/listinfo/project_owners
