ko-dos
ko-dos

Reputation: 1430

What's the situation with XSLT and XPATH in modern browsers?

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.

Upvotes: 7

Views: 418

Answers (2)

Jonathan Hanson
Jonathan Hanson

Reputation: 4839

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.

Upvotes: 3

mmcglynn
mmcglynn

Reputation: 7662

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.

Upvotes: 1

Related Questions