Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XSL-T in IE (JScript) >Thread Next - Re: XSL-T in IE (JScript) Re: XSL-T in IE (JScript)To: NULL Date: 6/3/2005 10:39:00 AM On Fri, 3 Jun 2005 11:15:07 +0200, "Petar Popara" <my.fake@m...>
wrote:
>
>I've tried this, but it doesn't work:
>
>var xmlDOM, xslDOM, t;
>
>xmlDOM = testxml.XMLDocument;
>if (xmlDOM == null) alert("xmlDOM == null");
>
>var t = xmlDOM.selectSingleNode("//Transformation");
>if (t == null) alert("t == null");
>
>var s = t.text;
>alert("XSLT: " + s); //s == empty string here :(
>
>xslDOM = new ActiveXObject("MSXML.DOMDocument");
>xslDOM.load(s);
>
>divResults.innerHTML = xmlDOM.transformNode(xslDOM);
>
></script>
></html>
>
>Why s is empty string? :(
S is 'empty' because the 'Transformation' node contains no text, only
other nodes.
You meant to alert(s.xml); rather than alert(s.text); to show the node
tree as a human-readable string value.
Cheers - Neil
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
