It&#39;s not reasonable to view the specification as prescribing syntax; what it specifies are the *semantics* of the DOM, and naturally, different languages and environments will implement these semantics differently.<br>
<br>Presumably, NodeType wasn&#39;t described as an enumeration in the document because neither IDL nor Java supported enumerations at the time.<br><br><br>My question is, why does the answer matter?<br><br><div class="gmail_quote">
On Thu, Oct 30, 2008 at 5:05 PM, Seo Sanghyeon <span dir="ltr">&lt;<a href="mailto:sanxiyn@gmail.com">sanxiyn@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am not sure to whom this mail should be addressed. Please help if you know.<br>
<br>
I am considering the idea of using System.Xml as a Python DOM<br>
implementation again. After some experimentation, one issue is this:<br>
an idiomatic way to check for the type of DOM node in Python is:<br>
<br>
if node.nodeType == node.ELEMENT_NODE:<br>
<br>
nodeType is spelled NodeType with capital N in .NET, but that&#39;s fine.<br>
I can translate naming convention. The problem is that .NET&#39;s XmlNode<br>
type does not have attributes for DOM node types, that is,<br>
ELEMENT_NODE, ATTRIBUTE_NODE, etc. Instead, these attributes ara<br>
available under XmlNodeType enumeration, with wholly different names,<br>
like Element, Attribute, etc.<br>
<br>
My question is, why is this blatant incompatibility?<br>
<br>
DOM level 1 Core standard<br>
<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html" target="_blank">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a><br>
<br>
seems to clearly say that Node interface should have constants like<br>
ELEMENT_NODE, ATTRIBUTE_NODE, etc. defined.<br>
<font color="#888888"><br>
--<br>
Seo Sanghyeon<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</font></blockquote></div><br>