Element values and IE
Element values (text) are not displayed in IE (6/7/8). They are in IE9, which supports textContent... Using something like the following snippet solves the problem:
function _getNodeValue(node){ var $textNodes = _getTextNodes(node); var textValue = ""; if (node && _isCommentNode(node)) { textValue = node.nodeValue; } else if($textNodes[0]) { //Extra if added to fix IE6/7/8 bug that did not show any element values... if ($textNodes[0].textContent) { textValue = $.trim($textNodes[0].textContent); } else { //IE6/7/8 case textValue = $.trim($textNodes[0].text); } } return textValue; }
Thanks. Wanna submit a pull request?
I would if I knew how. I'm a github noob and it's not like I can use a SVN client to commit code... Anyway, I'm working on several extensions (making the whole tree xsd aware etc.). If things work out, I guess I could read some documentation on how to commit my code...
P.S. Great work btw...
No worries; I'll incorporate soon. Cheers.
Same problem exists in setNodeValue too...