Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Microsoft.XMLDOM in JavaScript and fail loading XML with DTD

Status
Not open for further replies.

infinitycity

Programmer
Feb 11, 2002
1
DE
Hello,

in the following script

--------------- part of the javascript--------------
var logFile = new ActiveXObject("Microsoft.XMLDOM");
logFile.async="false";
logFile.load("log.xml");
var rootE = logFile.documentElement;
----------------------------------------------------

I'm trying to load the log.xml file, which uses the DTD "logEntry.dtd" as shown below:

----------------part of "log.xml"-------------------
<!DOCTYPE logEntry SYSTEM &quot;logEntry.dtd&quot;>
<logFile>
&logEntry;
</logFile>
---------------------------------------------------

As you can see I'm using an entity here which is defined in the DTD.

THE PROBLEM IS: The part &quot;logFile.documentElement;&quot; is null.
javascript has problems to cope with the DTD. Isn't it possible to use DTDs in Microsoft.XMLDOM or is there any other mistake?
When I replace the &logEntry; with normal Elements and remove the DTD-Definition, there is no problem at all.

Tx and Greetings
Sven Eisenhardt
T-Systems, debis-Systemhaus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top