XPath expression exception
- by fftoolbar
Hi
I am not really sure if i am doing this right with XPath expression. I am trying to locate a text on DOM and this text is assingned to a variable. I have text stored in SQLite and i have retrievd the text and i am trying to locate it on the webpage which actually contains the text. so i ahve the following code:
var searchText = dataset[x]['selectedText'];
alert(dataset[x]['selectedText']);
var res = googbar_frames[0].contentDocument.evaluate("//*[.=searchText]",googbar_frames[0].contentDocument.body,null,XPathResult.ANY_TYPE,null);
alert(res.snapshotLength);
And i get the following error.
Error: Permission denied for <http://en.wikipedia.org> to call method XPathException.toString on <>.
Error: Permission denied for <http://en.wikipedia.org> to call method XPathException.toString on <>.
Have got the expression correct. I am trying to look for the text on DOM. Or am i going wrong somwehere?
cheers