스크립트를 실행하려면 XsltSettings.EnableScript 속성을 사용하십시오
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
using System.Xml; using System.Xml.Xsl; using System.Xml.XPath; using System.IO; // // XmlDocument xml = new XmlDocument(); Xml.PreserveWhitespace = false; XslCompiledTransform xslt = new XslCompiledTransform(); StringWriter stringWriter = new StringWriter(); xml.PreserveWhitespace = false; xml.LoadXml(sParsing); //XML xslt.Load(Server.MapPath("ET_KR.xslt"), XsltSettings.TrustedXslt, new XmlUrlResolver()); //WEB //XmlReaderSettings settings = new XmlReaderSettings(); //XmlReader reader = XmlReader.Create(@"D:\Test\ET_KR.xslt", settings); //xslt.Load(reader, XsltSettings.TrustedXslt, new XmlUrlResolver()); //Application xslt.Transform(xml, null, stringWriter); //return stringWriter.ToString(); |