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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can xml be displayed in Netscape?

Status
Not open for further replies.

hotreca

Technical User
Nov 19, 2002
25
0
0
DE
Hi all

I've been trying to get xml to display in Netscape, Mozilla and Opera but only IE works.

What did I do?:
1. I exported data from Access 2k to a xml file, created a seperate xsl, and bound it in a html site with this code
<HTML xmlns:signature=&quot;urn:schemas-microsoft-com:eek:ffice:access&quot;>
<HEAD>
<META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html;charset=UTF-8&quot;/>
</HEAD>
<body>
<SCRIPT event=onload for=window>
objData = new ActiveXObject(&quot;MSXML.DOMDocument&quot;);
objData.async = false;
objData.load(&quot;path and filename.xml&quot;);
if (objData.parseError.errorCode != 0)
alert(objData.parseError.reason);

objStyle = new ActiveXObject(&quot;MSXML.DOMDocument&quot;);
objStyle.async = false;
objStyle.load(&quot;path and filename.xsl&quot;);
if (objStyle.parseError.errorCode != 0)
alert(objStyle.parseError.reason);

document.open(&quot;text/html&quot;,&quot;replace&quot;);
document.write(objData.transformNode(objStyle));
</SCRIPT>


</body>

</HTML>

Can any one tell me if xml is supported by other browsers and if yes how do I go about it displaying this data.

thks
hotreca
[noevil]
 
It can, but you have to parse it first. IE has the MSXML parser embedded so it can display XML directly. To view in Netscape and the gang you need to employ a stand alone parser. There are a number of java parsers out there, but they are pretty slow. It's funny, but up until IE 5.0 I was a Netscape fan and truly believed that they would be the first to support XML properly. Boy was I wrong.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top