make Format.ArcXML tests pass in Safari, invalid XML documents are dealt with differently in Safari, r=elemoine (closes #2626)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2010-05-11 07:17:48 +00:00
parent a1f90c7ac8
commit fd32f2e9dd

View File

@@ -221,7 +221,9 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, {
} }
} }
if (!arcNode) { // in Safari, arcNode will be there but will have a child named
// parsererror
if (!arcNode || arcNode.firstChild.nodeName === 'parsererror') {
var error, source; var error, source;
try { try {
error = data.firstChild.nodeValue; error = data.firstChild.nodeValue;