function
acxmlboard(a) {
jQuery.ajax({
type:
"GET"
,
url:
"XML_DATA_FILE"
,
dataType:
"xml"
,
success:
function
( xmlDoc, status )
{
processXMLDoc( xmlDoc, a );
},
complete:
function
( xhr, status )
{
if
( status ==
'parsererror'
)
{
alert(
"There was a PARSERERROR. Luckily, we know how to fix that.\n\n"
+
"The complete server response text was "
+ xhr.responseText ) ;
xmlDoc =
null
;
if
( window.DOMParser )
{
parser=
new
DOMParser();
xmlDoc=parser.parseFromString( xhr.responseText,
"text/xml"
) ;
}
else
{
xmlDoc=
new
ActiveXObject(
"Microsoft.XMLDOM"
) ;
xmlDoc.async =
"false"
;
xmlDoc.loadXML( xhr.responseText ) ;
}
processXMLDoc( xmlDoc, a ) ;
}
},
error:
function
( xhr, status, error )
{
alert(
'ERROR: '
+ status ) ;
alert( xhr.responseText ) ;
}
});
}