RE: DOM 2 Spec vs. Java Binding

Guys,

Thanks for the responses they were most instructive. The reason this arose
was because I was playing with some stuff on the .Net platform casting from
System.Xml.XmlCDataSection (the child class according to the Java bindings)
to System.Xml.XmlText (the alledged parent class according to the Java DOM 2
bindings):

// xc is an instance of System.Xml.XmlCDataSection
System.Xml.XmlText xt = (System.Xml.XmlText)xc; // Can't do this cast

But when I try to cast from CDATASection to CharacterData:

System.Xml.XmlCharacterData cd = (System.Xml.XmlCharacterData)xc;

things work just fine which I would have expected from the spec, but not
from the Java bindings.

Therefore perhaps my question should have been: Is the Microsoft
interpretation of the DOM spec compatible with that of the Java camp? If
not, which is authoritative (W3C I assume)? And how is DOM's cross-platform
nature not compromised by this?

Jim

Received on Wednesday, 7 August 2002 11:54:49 UTC