views:

136

answers:

2

I'm writing javascript code to traverse and manipulate deeply nested XML documents. With modern browsers, is there still a need for crossbrowser libraries like:

As far as I know, without using one of these there won't be any XPath in IE with ActiveX disabled. And a simple wrapper is needed for both XSLT and XPath to distinguish between IE and w3c XML Dom.

+1  A: 

The situation is bad and not improving very quickly. Add Chrome to your list. Process the XML server side if you can, SimpleXML in PHP5 and the Xml control in ASP.NET are great places to begin.

mmcglynn
+3  A: 

As long as you stick to XSLT 1.0 functionality, I would say that XSL and XPATH support work reasonably well on all browsers, even as far back as IE6.

That being said, there's enough annoyances in client-side XSLT processing (including until recently a fiendish JQuery bug in firefox for files generated with client-side XSLT) to make it not worth your time.

I worked hard on this topic during most of 2009, and I just can't see any good reason to do the processing on the client, when it's just as easy to do it on the server. If you have to offer XML, allow the client to specifically request it with a query-string variable or an Accept: header.

Jonathan Hanson