Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 272415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:18:41+00:00 2026-05-12T00:18:41+00:00

I’m trying to have a script automatically transform an xml file into several html

  • 0

I’m trying to have a script automatically transform an xml file into several html files using different xslt style sheets. However, whatever I try, I get errors. I’ve tried it in both VBscript and JScript, and both give me errors. The xml file is 537 KB, and the xsl file is 5 KB.

Here’s iteration 1 in JScript. This script works for one of my style sheets (a style sheet that creates a smaller html file), but on a stylesheet that creates a bigger html file, it gives me an “invalid procedure call or argument” on outstr (as if outstr didn’t return properly) error :

var xsl = new ActiveXObject("MSXML2.DomDocument.6.0");
xsl.async = false;
var boolval = xsl.load("../Commands/commands.xsl");
if(!boolval)
{
    WScript.Echo("XSL load error");
    WScript.Quit();
}
var xml = new ActiveXObject("MSXML2.DomDocument.6.0");
xml.async = false;
boolval = xml.load("../Commands/commands.xml")
if(!boolval)
{
    WScript.Echo ("XML load error " );
    WScript.Quit();
}

var fso = new ActiveXObject("Scripting.FileSystemObject");
var outstr = xml.transformNode(xsl);

var ofl = fso.CreateTextFile("../Commands/commands.html", true, false);
ofl.Write (outstr);
ofl.Close();

So here’s iteration 2, using the transformNodeToObject method instead. In this case, I get an “Unspecified error” code 80004005 in msxml6.dll:

var xsl = new ActiveXObject("MSXML2.DomDocument.6.0");
xsl.async = false;
var boolval = xsl.load("../Commands/commands.xsl");
if(!boolval)
{
    WScript.Echo("XSL load error");
    WScript.Quit();
}
var xml = new ActiveXObject("MSXML2.DomDocument.6.0");
xml.async = false;
boolval = xml.load("../Commands/commands.xml")
if(!boolval)
{
    WScript.Echo ("XML load error " );
    WScript.Quit();
}

var result = new ActiveXObject("MSXML2.DomDocument.6.0");
xml.transformNodeToObject(xsl, result);

result.save("../Commands/commands.html");

My intuition says that the processor just can’t handle creating a file that big. Is this right, or am I doing something wrong. If it’s just a size issue, is there some other library/object I can use in vbscript/jscript that will get the job done?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:18:42+00:00Added an answer on May 12, 2026 at 12:18 am

    A few kB of XML won’t break MSXML, under no circumstances whatsoever. The memory of your machine is the limit, so file size can’t be the problem. Also the choice of host language (JScript or VBScript) is completely irrelevant, there is nothing that VBScript can do but JScript can’t, or vice-versa. You are doing COM here, so the language can’t be the problem either. It’s safe to stop looking into that direction.

    This leaves one possibility. You must be doing something wrong. 😉 This may include MSXML configuration or installation problems on your machine, maybe even wrong file system access settings or process credentials.

    Since I cannot spot an immediate problem in your code and you did not provide any XML to test with, I can only recommend a few things that may help debugging this. Try, not necessarily in that order:

    • Check that all your XML files are well-formed and correctly encoded. I am sure you are through with that already. Loading them into IE will suffice, if that works they’re good.
    • Remove and re-install MSXML, make sure you also have an older version (4.0) installed.
    • Download msxsl.exe from Microsoft and do the transformations on the command line, to check if they work at all – this tiny tool uses MSXML internally and has never failed me in the past.
    • Try your code with "MSXML2.DomDocument.4.0", as there is no strikingly good reason to use 6.0 anyway (other than “newer is better”, I guess).
    • Only to exclude it as a reason, run the whole thing as an Admin level user, and on a different machine. See if the error is reproducible.
    • If all else fails, upload the files somewhere, post the links here and I’ll have a look at them as well.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 202k
  • Answers 202k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer A cycle (or "references loop") is two or more objects… May 12, 2026 at 8:17 pm
  • Editorial Team
    Editorial Team added an answer I am currently in Tokyo, and I used to be… May 12, 2026 at 8:16 pm
  • Editorial Team
    Editorial Team added an answer You could remove the reloadData and use insertRowsAtIndexPaths:withRowAnimation: instead to… May 12, 2026 at 8:16 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.