testxslt.js 569 B

123456789101112
  1. //Args: input-file style-file output-file
  2. var xml = WScript.CreateObject("Microsoft.XMLDOM"); //input
  3. xml.validateOnParse=false;
  4. xml.load(WScript.Arguments(0));
  5. var xsl = WScript.CreateObject("Microsoft.XMLDOM"); //style
  6. xsl.validateOnParse=false;
  7. xsl.load(WScript.Arguments(1));
  8. var out = WScript.CreateObject("Scripting.FileSystemObject"); //output
  9. var replace = true; var unicode = false; //output file properties
  10. var hdl = out.CreateTextFile( WScript.Arguments(2), replace, unicode )
  11. hdl.write( xml.transformNode( xsl.documentElement ));
  12. //eof