Can't you use 'string-value' on the node? Here's is a link about it:
http://www.w3.org/TR/xpath#dt-string-value
On Tue, Aug 26, 2008 at 9:01 PM, martin <[EMAIL PROTECTED]> wrote:
>
> hi all,
> I am a total n00b on Greasemonkey and was just wondering how you would
> convert a XPathResult to string so it becomes searchable (indexOf or
> search)
>
> here some example code:
>
> var allLinks, thisLink;
> allLinks = document.evaluate('//
> [EMAIL
> PROTECTED]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
> for (var i = 0;i<allLinks.snapshotLength;i++){thisLink =
> allLinks.snapshotItem(i);if (thisLink.search('pubmed') > -1)
> {document.write(thisLink);}}
>
> Help is muchly appreciated
>
> >
>
--
Regards
Jack
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---