OpenLayers OpenLayers

Ticket #535 (closed feature: duplicate)

Opened 2 years ago

Last modified 1 year ago

IE XMLSerializer needed

Reported by: crschmidt Assigned to:
Priority: minor Milestone: 2.5 Release
Component: general Version:
Keywords: Cc:
State:

Description

IE has no built in XML Serializer. The OpenLayers.Ajax.serializeXMLToString function will fail in IE. We should choose a library which has an XML Serializer with namespace support in it and allow users to use it with IE to add serialize support.

Change History

(in reply to: ↑ description ; follow-up: ↓ 2 ) 07/12/07 08:01:49 changed by openlayers

Replying to crschmidt:

hope this helps: I could not parse a kml file with IE, although it works fine in Moz. I read your comment linking this ticket. In my application, i altered Ajax.serializeXMLToString like this:

OpenLayers.Ajax.serializeXMLToString = function(xmldom) {

var serializer = new XMLSerializer(); data = serializer.serializeToString(xmldom); return data;

}

That merely got me the elements, but the file could not be loaded at all. this is due to the XMLDOM.loadXM´L method's parameter in OpenLayers.parseXMLString. I changed it to method ~.load(url) and all works fine. Hope this helps.

Yours

(in reply to: ↑ 1 ) 07/12/07 08:02:43 changed by openlayers

soory, i ment this one :-)

OpenLayers.Ajax.getElementsByTagNameNS = function(parentnode, nsuri, nsprefix, tagname) {

return parentnode.getElementsByTagNameNS ?

parentnode.getElementsByTagNameNS(nsuri, tagname) : parentnode.getElementsByTagName(tagname);

}

07/15/07 01:48:38 changed by crschmidt

  • status changed from new to closed.
  • resolution set to duplicate.

The work in #841 should solve this ticket.