I have following XML in this.treeSpec variable.
<root>
<item id="9PQ0" pathId="08Z" specId="9PQ0" rel="MainRequest">
<content>
<name>ABC</name>
</content>
<item id="9PQ02" pathId="08Z2X" specId="9PQ0" rel="property">
<content>
<name>ABC1</name>
</content>
<item id="9PQ02" pathId="08Z2" specId="" ruleId="CYZ3F7WM861" rel="E" >
<content>
<name>ABC2</name>
</content>
</item>
To get first item ID I am using below code.
var rootNode = $(this.treeSpec).find("item").first();
var rootId = rootNode.attr("id");
It works perfectly in Chrome and Mozilla but it is not working in IE.
Can any one tell me how can we write code to work in IE as well.
This might not be the actual solution, but try wrapping your xml in element like div and then try doing find, like:
Hope it helps