ajax xml not parsing
ajax xml not parsing
I'm sorry if this is repetitive. I am trying to GET and parse an XML document that has been validated by W3C validator. After trying $.parseXML as seen in examples on this site $xml.length returns 0. Examining the data directly shows the text of the doc. This is extremely frustrating. Please help.
CODE:
function loadContract() {
$(function(){
$.ajax({
url:'http://www.ctunet.com/Contract.xml',
type:'GET',
dataType: 'xml',
success:function(data){
var xml = data,
xmlDoc = $.parseXML( xml ),
$xml = $( xmlDoc );
$("#currentTitle").text($xml.length);
}
});
});
}