ppcguy wrote:
i've got this in firefox and it works
var xpath_result = document.evaluate("id('main')/tbody", document, null,
XPathResult.FIRST_ORDERED_NODE_TYPE, null );
var table = xpath_result.singleNodeValue;
what's the IE equivalent of it.
It depends, if your document is an XML DOM document like IE gives you
with XMLHTTP as responseXML then you can do XPath queries with
selectNodes and selectSingleNode e.g.
var tbody = xmlDocument.selectSingleNode("id('main')/tbody");
If your document is a HTML document rendered in IE then there is no
XPath support (respectively no support for XPath over HTML).
That simply example however can be done with the Core and HTML DOM e.g.
var tableBody = document.getElementById('main').tBodies[0];
so I am not sure why you use XPath at all if that is an HTML document.
--
Martin Honnen
http://JavaScript.FAQTs.com/