I'm using the following code...
var result = document.evaluate(expr,context,null,9,null);
When printing the result I get the following error...
Error: TYPE_ERR: DOM XPath Exception 52
This appears to be an issue with webkit in general as evident from the following issue...
http://code.google.com/p/chromium/issues/detail?id=68770
I'm wondering, does anyone know of a workaround way I can make this work? The work around need only suit just webkit. It does not needed to work in Firefox, IE, etc.
NOTE: I myself am working with Google Chrome but I've included the other popular applications which use webkit since this issue is relevant to them too.
EDIT: Same result when I call screenshotLength()
on result
.
EDIT 2
var result = document.evaluate(expr,context,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;
Appears to produce undefined