javascript - JScript/VBScript error -


I'm trying to automatically convert a XML file into various HTML files which are separate XSLT uses style sheets. However, whatever I try, I get errors. I have tried it in both VBSScript and JScript, and both of them give errors to me. The XML file is 537 KB, and the XSL file is 5 KB.

Here's 1 walk in Jstrepe. This script works for one of my style sheets (a style sheet that creates a small HTML file), but on a stylesheet that creates a large HTML file, it gives me an "invalid process call or argument" on the outstretch (As such, the Outstanding Error is OK:

  var xsl = New ActiveXObject ("MSXML2.DomDocument.6.0"); Xsl.async = false; Var boolval = xsl.load ("../ Order / Command.xl "); If (! Boolval) {WScript.Echo (" XSL Load Error "); WScript.Quit ();} Var xml = New ActiveXObject (" MSXML2.DomDocument.6.0 "); Xml.async = False; Boolval = Xml.load ("../ command / command.exml") if (! Boolevel) {WScript.Echo ("XML Load Error"); WScript.Quit ();} Var fso = New ActiveXObject ("Scripting.FileSystemObject" ); Var outstr = xml.transformNode (xsl); var ofl = fso.CreateTextFile ("../ command / commands html", true, false); Ofl.Write (outstr); ofl.Close ();  

Then instead of using the transaction nododobetta method, there is duplication here 2. In this situation, I get msxml6.dll in an "unspecified error" code 80004005:

 < Code> var xsl = new ActiveXObject ("MSXML2.DomDocument.6.0"); Xsl.async = false; Var boolval = xsl.load ("../order / command.xl"); If (Boolval) {WScript.Echo ("XSL Load Error"); WScript.Quit (); } Var xml = New ActiveXObject ("MSXML2.DomDocument.6.0"); Xml.async = false; Boolval = xml.load ("../order / command.exml") if (! Boolevel) {WScript.Echo ("XML Load Error"); WScript.Quit (); } Var result = new ActiveXObject ("MSXML2.DomDocument.6.0"); Xml.transformNodeToObject (xsl, result); Result.save ("../order / commands.html");  

My intuition says that the processor can not handle just creating that file which is bigger whether it is correct, or I'm doing something wrong if it's just a size issue, So can any other library / object I use in vbscript / jscript which will work?

Some XML kms will not be able to break MSXML, not under any circumstances. Your machine has a memory limit, so the size of the file can not be a problem. Apart from this, the choice of host language (JScript or VBSScript) is completely irrelevant, there is nothing that VBSP can do, but JScript can not, or vice versa. You are COM here, so language can not be a problem too it is safe to stop watching in this direction.

There is a possibility that you should do something wrong ;-) This may include MSXML configuration or installation problems on your machine, perhaps incorrect file system access settings or process credentials.

Since I can not find any immediate problem in your code and you can do any XML test with it, I can only recommend some things that can help debug this sequence Not necessarily, try:

  • Check that all your XML files are well-formed and are correctly encoded. I'm sure that you already have it in loading it in IE, if it works, they are good.
  • Remove and reinstall MSXML, make sure that you have an older version (4.0) installed.
  • To download and make changes to the command line, to check that they work at all - this small tool internally uses MSXML and I have never failed before .
  • In the form of "MSXML2.DomDocument.44.0" , there is no surprisingly good reason to use 6.0 anyway (except for the "New Better"), I suppose is).
  • To exclude it as only one reason, talk to the admin level user and on a different machine. See that the error is reproducible.
  • If everything fails, upload the file somewhere, post the link here and I will also have a look at them.

Hope this helps.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -