Why is nodeName sometimes all-caps in javascript DOM?
Posted
by harpo
on Stack Overflow
See other posts from Stack Overflow
or by harpo
Published on 2010-03-24T19:12:55Z
Indexed on
2010/03/24
19:33 UTC
Read the original article
Hit count: 293
So I have a DOM document that looks essentially like this
<categories>
<category id="1"/>
<category id="2"/>
</categories>
This is how the document previews in Firebug, as I would expect.
However, when I POST this to the server, I get
<categories>
<CATEGORY id="1"/>
<CATEGORY id="2"/>
</categories>
Indeed, doc.documentElement.firstChild.nodeName returns "CATEGORY". The nodes are added using jQuery.append('<category/>').
Why are the child tags returned in all caps?
© Stack Overflow or respective owner