jQuery's parseXML fails (invalid XML) when using namespaces -
if try following:
var xmlobject = $($.parsexml('<foo xs:type="one type">bar</foo>')); jquery returns parsing error:
invalid xml: <foo xs:type="onetype">bar</foo> - { "stack": ".error@http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js:3 .parsexml@http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js:3 but if try:
var xmlobject = $($.parsexml('<foo xs-type="one type">bar</foo>')); it works fine. in current development, call server , xml result string. , string contain namespaces xs:type. i'll have parse xml , other stuff results. have remove colons string before parsing parsexml? there workaround this?
Comments
Post a Comment