[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Using native XPath in IE with Javascript

Subject: Re: Using native XPath in IE with Javascript
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 18 Feb 2008 13:56:50 +0100
Re:  Using native XPath in IE with Javascript
Manfred Staudinger wrote:
Hi,

>From a posting back in 2004 by Dimitri Glazkov, speaking about IE (I
would be interested in the second case only):
I mean, you can very much do XPath in JavaScript, except it can
only occur in two
cases (that I know of):
1) As call to an Msxml.DOMDocument object, created using the new
ActiveXObject() statement.
2) If an HTML document was generated as a result of a client-side
XSL transformation
from an XML file.
http://glazkov.com/blog/xpath-unleashed/

3) on the current HTML document that is loaded in the browser. However, note that you have to reload it in a freethreaded DOM object to make it work with XSLT (iirc).


4) in an msxml:script object, though I wouldn't recommend it.

Using XSLT in a browser through JavaScript is usually easiest with the excellent open source Sarissa, which takes away the burden of little differences in calling XPaths directly (i.e., the function parameter for the namespace is at the end in FF/Op and at the beginning in IE).

Cheers,
-- Abel Braaksma

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.