Problem with Netscape xml processing

Problem with Netscape xml processing

Post by sort » Tue, 08 Jul 2003 21:18:53



I am trying to process some xml code which I have embedded in my HTML document.
This is allowed as I looked at the Mozilla site.

When I use the nodeName, Netscape Javascript returns the value in UPPER case.

This means that my xml element name is now different and unusable.  

Is this a bug in Netscape? I've also tried .tagName but no luck.

Here is an example posting that is to be run on Netscape 7:

<HTML>
<SCRIPT LANGUAGE=javascript>

function init_page()
{
    alert("what?")
    var nm =
    document.getElementById("hello").nodeName
    if(nm == "XML")
    {
        alert("Shows if Compared with UPPER case")
    }

    if(nm == "xml")
    {
        alert("Shows if Compared with small case")
    }

    var pt =document.getElementById("hello").childNodes.item(1).nodeName
    if(pt == "APPLES")
    {
        alert("Shows if Compared with UPPER case2")
    }

    if(pt == "apples")
    {
        alert("Shows if Compared with small case2")
    }

Quote:}

</SCRIPT>

<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>

<BODY onLoad="init_page()">

<P>?</P>

</BODY>
</HTML>

<xml id="hello">
<apples>hello there</apples>
</xml>

 
 
 

Problem with Netscape xml processing

Post by Martin Honne » Tue, 08 Jul 2003 21:41:02



> I am trying to process some xml code which I have embedded in my HTML document.
> This is allowed as I looked at the Mozilla site.

XML data islands are not support by Mozilla. Use an external XML file
which you load with script

Quote:

> When I use the nodeName, Netscape Javascript returns the value in UPPER case.

Yes, if you insert some tags in an HTML document they are treated as
HTML and for HTML nodeName/tagName are normalized to upper case letters.

--

        Martin Honnen
        http://JavaScript.FAQTs.com/

 
 
 

1. Problem in displaying XML pages in Netscape Enterprise Server

Hi
I can't seem to display XML page in Netscape Enterprise Server. I have set
the MIME type to text/xml and text/xsl, also tried applicaiton/xml and
application/xsl with no luck.
I have tried to display the same page in Apache Web server and there was no
problem.
Would appreciate if someone can help me on this.

Thanks
William Chung

2. Source of tconsole program for sun4c machines

3. netscape security problem with AElfred (XML parser)

4. first row of database

5. weird problem (Netscape, xml/xsl, embedded .rm)

6. Frontier: Regarding Wormholes

7. Problem in running the XML file in Netscape 6.x???

8. Linux: noteedit-1.11.0 (Zoom)

9. realmedia embedding problem with Netscape

10. netscape 6 utf-16 problem

11. Processing Processing Instructions

12. Problem processing XML with XSLT stylesheet

13. Problems with XSL on Netscape 7 using document.domain within frames