javascript - jquery parseXML: 'text/dom' is not a valid enum value of type SupportedType -
after changes in project (the changes not related xml parsing part) jquery.parsexml stopped working in firefox , chrome (i haven't tried other browsers).
i tested simple xml strings as
$.parsexml('<a>a</a>');
with following result:
"error: invalid xml: <a>a</a>"
the internal message (catched jquery) following:
"failed execute 'parsefromstring' on 'domparser': provided value 'text/dom' not valid enum value of type supportedtype."
this triggered following jquery code lines:
tmp = new domparser(); xml = tmp.parsefromstring( data, "text/dom" );
i don't know how possible, since changes had nothing todo xml parsing.
its working if parse without jquery , type "application/xml", why did domparser accept "text/dom" type before ?
edit
somehow jquery version installed through bower (version 2.1.4) differs official version:
my version:
xml = tmp.parsefromstring( data, "text/dom" );
from jquerysource:
xml = tmp.parsefromstring( data, "text/xml" );
but worked old version months.
solution: switched jquery file , working, somehow bower version outdated. nevertheless strange behaviour , don't know why working before, , why stopped working 1 day another.
Comments
Post a Comment