You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by mo...@factset.com on 2000/12/10 23:11:33 UTC

Casting question

I was wondering how the following code should behave:

DOM_Text tempNode = cdataNode // assume cdataNode is of type
DOM_CDATASection and is initialized else where
tempNode.getNodeType()  // Should this always return NodeType::TEXT_NODE or
NodeType::CDATA_SECTION_NODE ?

If it returns CDATA_SECTION_NODE (which seems to be the case), then is it
safe to assume that, for all intents and purposes, the tempNode is (and
behaves as)
a CDATA_SECTION_NODE even though it is declared as type DOM_Text?  I know
this probably sounds very basic, but I must be
sure that this sort of assumption is valid.

Thanks,
Mafco 5