xslt - successor of msxsl.exe? -


we intend migrate our framework msxml4 msxml6. using msxsl.exe yet. seems support msxml versions 4.0, command line msxsl.exe -u version 6.0 tells me. there successor of msxsl.exe? alternative command line processor?

there number of ways replace existing processor, depends on level of functionality require , whether need msxml specific functionality. example there xsltproc part of libxslt (can windows binaries here example). this page gives quick replacement in c# both change command line usage , might not implement same msxml extensions (xsltproc doesn't).

if interested in simple command line processor uses msxml 6 worse using simple jscript application. save following code xsltr.js , run cscript msltr.js input.xml template.xsl output.txt:

var adtypebinary = 1; var adsavecreateoverwrite = 2; var adsavecreatenotexist = 1;  try  {     var args = wscript.arguments;      if(args.length < 3)     {         wscript.echo("usage: xsltr.js file.xml file.xsl output.txt");         wscript.quit(1);     }     else     {         var xml = args(0);         var xsl = args(1);         var out = args(2);          var xmldoc = new activexobject("msxml2.domdocument.6.0");         var xsldoc = new activexobject("msxml2.domdocument.6.0");          /* create binary istream */         var outdoc = new activexobject("adodb.stream");         outdoc.type = adtypebinary;         outdoc.open();          if(xmldoc.load(xml) == false)         {             throw new error("could not load xml document " + xmldoc.parseerror.reason);         }          if(xsldoc.load(xsl) == false)         {             throw new error("could not load xsl document " + xsldoc.parseerror.reason);                  }          xmldoc.transformnodetoobject(xsldoc, outdoc);         outdoc.savetofile(out, adsavecreateoverwrite);     } } catch(e) {     wscript.echo(e.message);     wscript.quit(1); } 

still there rationale cannot use msxsl? version 4.0 of msxml has never been standard installation have had instal manually (though think came office @ 1 point). not deploy version 4 on machines need processing on?


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -