How do I get the attribute value of an XML node with Javascript / jQuery?
I'm trying to get the value of the duration attribute on the node, then get the fixedValue.
'
So far I've got:
var currentLoanRates = function() {
var currLoanXml = '',
xmlDoc = $.parseXML( currLoanXml ),
$xml = $( xmlDoc ),
$intRate = $xml.find("interestRate"),
$varIntRate = $intRate.attr("fixedValue");
console.log($intRate);
console.log($varIntRate);
};
The second console.log prints undefined.