Subject: Re: [xsl] xmlDoc.documentElement Error From: "David Rigby" <D.A.Rigby@xxxxxxxxxxxxxx> Date: Tue, 25 Mar 2003 13:06:00 -0000 |
Stupid question perhaps, but are you sure your source document is valid? The only two typical reasons for MSXML giving you a null document element are either because the file doesn't exist (or is unreachable on the server), or an error occurs during parsing. Unless of course you're loading a massive document on a severely memory-limited client...I guess that might cause it too. David PS I'm sure someone will mention that this isn't an XSLT question though :) ----- Original Message ----- From: "Neumyer, Jim" <jim.neumyer@xxxxxxx> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, March 25, 2003 12:51 PM Subject: [xsl] xmlDoc.documentElement Error > Hello, > > I am getting an error with XML/XSL. It is saying that > 'xmlDoc.documentElement' is null or not an object. Line 47, char 7. > This is reported in IE 6. > > I have installed the XML SDK from Microsoft (Version 4.0). > > This is being run from an Apache web server on UNIX. The /x12 directory > exists under the Apache directory and all of the files that it is trying to > access exist with data. > > Here is the code where it comes from: > <HTML> > <HEAD> > <title>Index Tree</title> > <!-- left-hand frame for x12 displays --> > <LINK REL="stylesheet" type="text/css" href="/x12/common.css"/> > <SCRIPT LANGUAGE="Javascript"> > var xmlDoc; > var iconb; > var iconbO; > var iconrb; > var iconrbO; > var iconp; > var iconrp; > > function initAdmin() { > var xslDoc; > > iconb = new Image(); > iconb.src = "/icons/b.gif"; > iconbO = new Image(); > iconbO.src = "/icons/bO.gif"; > iconrb = new Image(); > iconrb.src = "/icons/rb.gif"; > iconrbO = new Image(); > iconrbO.src = "/icons/rbO.gif"; > iconp = new Image(); > iconp.src = "/icons/p.gif"; > iconrp = new Image(); > iconrp.src = "/icons/rp.gif"; > > xmlDoc = new ActiveXObject('Microsoft.XMLDOM'); > xmlDoc.validateOnParse = false; > xmlDoc.resolveExternals = false; > xmlDoc.preserveWhiteSpace = false; > xmlDoc.async = false; > > xslDoc = new ActiveXObject('Microsoft.XMLDOM'); > > xslDoc.validateOnParse = false; > xslDoc.resolveExternals = false; > xslDoc.preserveWhiteSpace = false; > xslDoc.async = false; > > xmlDoc.load("/x12/_data/xmlo.myipaddr"); > xslDoc.load("/x12/tree.xslt"); > > folderTree.innerHTML = xmlDoc.documentElement.transformNode(xslDoc); > collapse(folderTree); > } > </SCRIPT> > <SCRIPT LANGUAGE="Javascript" SRC="/x12/admin.js"></SCRIPT> > </HEAD> > <BODY ONLOAD="initAdmin()" ONSELECTSTART="return false" TOPMARGIN="0" > LEFTMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0"> > <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="100%" > WIDTH="100%" NOWRAP="true" STYLE="border-right: 1px solid black;" > VALIGN="TOP"> > <TR> > <TD STYLE="background-color: #5389bc"> > <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" width="100%"> > <TR> > <TD><center><DIV id="B1" CLASS="bOut" > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this, 'bOut')" > ONCLICK="searchMenu()">Search</DIV></center></TD> > <TD><center><DIV id="B2" CLASS="bOut" > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this, 'bOut')" > ONCLICK="expandErrors(folderTree)">Errors</DIV></center></TD> > <TD><center><DIV id="B3" CLASS="bOut" > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this, 'bOut')" > ONCLICK="expandClaims(folderTree)">Claims</DIV></center></TD> > <TD><center><DIV id="B4" CLASS="bOut" > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this, 'bOut')" > ONCLICK="expandAll(folderTree)">ExpandAll</DIV></center></TD> > <TD><center><DIV id="B5" CLASS="bOut" > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this, 'bOut')" > ONCLICK="collapse(folderTree)">Minimize</DIV></center></TD> > </TR> > </TABLE> > </TD> > </TR> > <TR> > <TD HEIGHT="100%"> > <DIV ID="folderTree" STYLE="padding-top: 8px;width: 100%;height: > 100%;overflow: auto;"></DIV> > </TD> > </TR> > </TABLE> > </BODY> > </HTML> > > Thanks, > wimpy > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xmlDoc.documentElement Error, Neumyer, Jim | Thread | Re: [xsl] xmlDoc.documentElement Er, Oleg Tkachenko |
[xsl] Copy XML into an attribute, Fran | Date | Re: [xsl] xmlDoc.documentElement Er, Oleg Tkachenko |
Month |