Another 3:25AM head scratcher.
I'm getting the following error:
Error: responseXml.evaluate is not a function
Source File:
file:///C:/Program%20Files/sunbird/extensions/%7BC1A207F4-634F-4939-BCC7-5A56AA307077%7D/components/calExchangeCalendar.js
Line: 138
My code looks like this: (e is the event prameter of the onload of my
XmlHTTPRequest)
var responseXml = e.target.responseXML;
var responses = responseXml.evaluate('DAV:multistatus/DAV:response',
responseXml, NSResolver, 5, null);
This is happening in a nightly trunk of Sunbird:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1)
Gecko/20050828 Mozilla Sunbird/0.2+
Any Ideas?
Gary
I'm still stuck with this.
I think I read somewhere that XPath is an optional build component, but
I checked
http://lxr.mozilla.org/mozilla/source/calendar/sunbird/config/mozconfig
and there is no --disable-xpath. I don't realy understand how the build
system's options work, so I'm not sure wether or not the XPath is ment
to be there or not.
Can any one assist me here?
Gary
This may be irrelevant but since there is no other answer...
AFAIK, XmlHTTPRequest.responseXml is a DOM compatible object but not
actually an XMLDocument, so it may actually not support evaluate as
XMLDocument and Document do. You could try to reparse, or better, copy
the nodes into an XMLDocument and use that for XPath evaluation.
hth.
Manos
I checked the type of the value returned from responseXml with venkman
and it is XMLDocument.
Thanks though.
Gary
Gary van der Merwe wrote:
> I checked the type of the value returned from responseXml with venkman
> and it is XMLDocument.
I don't know Sunbird and in which context you use script there but I
tried some simple script example in a HTML document loaded with a recent
Firefox nightly trunk build and responseXML.evaluate works fine there.
So what are you doing exactly, simply creating
new XMLHttpRequest()
in a script?
--
Martin Honnen
http://JavaScript.FAQTs.com/
It's probably an extension, and sunbird's default extension list is in
configure.in:
4126 MOZ_EXTENSIONS_DEFAULT=pref xmlextras transformiix
I don't know whether that includes XPath, though...
Oh, heh. That's a bug in the configure script - the variable must be quoted:
/home/chb/mozilla/configure: line 12669: xmlextras: command not found