• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does NetScape support DOM?

 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a HTML page and a JavaScript file. In the JavaScript file I'm trying to load an XML file to be handled via DOM. It's quite simple. The problem is how to do it in NetScape?
I took a look at some articles and found the following script:
var XMLDocument = document.implementation.createDocument("", "", null);
XMLDocument.load("NomeDoArquivoXML");
It should work well, but it does not.
Maybe there is missing some parameter in the createDocument method.
Bellow is the snippet I coded:
/** This function creates an XML document and loads it with values passed by "XMLString" */
function loadXML(XMLString, IsFreeThreaded)
{
var XMLDocument = (IsFreeThreaded) ? new ActiveXObject("MSXML2.FreeThreadedDomDocument") : new ActiveXObject("MSXML2.DomDocument");
XMLDocument.validateOnParse = true;
XMLDocument.async = false;
if ((XMLString != null) && (XMLString != ""))
{
XMLDocument.loadXML(XMLString);
}
return XMLDocument;
}
/** This function creates an XML document and loads it with values contained in the XML file called "XMLFile". */
function loadXMLFile(XMLFile, IsFreeThreaded)
{
var XMLDocument = (IsFreeThreaded) ? new ActiveXObject("MSXML2.FreeThreadedDomDocument") : new ActiveXObject("MSXML2.DomDocument");
XMLDocument.validateOnParse = true;
XMLDocument.async = false;
XMLDocument.load(XMLFile);
return XMLDocument;
}

I'm I doing the right thing?
Suggestions will be welcome.
Thanks!
Luciano Queiroz
 
Rakesh Gudur
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luciano,
Netscape does not support XML. IE is the only browser which has inbuilt DOM parser.
Thanks,
Rakesh.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic