Exception while loading XslTransform
-
Hi, While executing following line i an getting XML exception
XslTransform xslt = new XslTransform(); XPathNavigator navigator = xsldoc.CreateNavigator();/// xsldoc is XPathDocument doc try { xslt.Load(navigator, null, null); } catch(Exception ex) { logger.Error("Ex:" + ex.Message + ":" + ex.StackTrace); }
Sometimes the above code throws exception with stack strace given below.(19,2) : at System.Xml.Xsl.Compiler.Compile(NavigatorInput input, XmlResolver xmlResolver, Evidence evidence) at System.Xml.Xsl.XslTransform.Compile(XPathNavigator stylesheet, XmlResolver resolver, Evidence evidence) at System.Xml.Xsl.XslTransform.Load(XPathNavigator stylesheet, XmlResolver resolver, Evidence evidence)
I looked at MSDN for these function which mentions that this will work only on .Net FrameWork 1.1 On my machine. I have 1.1, 1.1 with hotfixes, 2.0 and 3.0. FrameWork installed. Regards Abhi Lahare