Forum Moderators: open
<date year="2005" month="09" day="06">2005-09-06</date>
Which I fetch like this:
var dateAttr = trips[i].getElementsByTagName('date')[0].attributes;
var month = dateAttr['month'].nodeValue;
And IE says "month.nodeValue" is null or not a value. What am I doing wrong here?
dateAttr['month'] I can't get MSXML to return a node when accessed via ['_attribute_name_']
- although it does work in IE with custom HTML element attributes.
Any reason not to do this instead ..?:
trips[i].getElementsByTagName('date')[0].getAttribute('month') trips[i].getElementsByTagName('date')[0].getAttributeNode('month').nodeValue