There is not a clean way to do it in the current
code base that would mimic
DOM_Entity entity = (DOM_Entity) node;
in Java. To do this, we would need an
DOMNode::operator DOM_Entity() that
would throw an exception if the node
type was inappropriate.
The best you can do, is to check the node
type and then take advantage of the
knowledge that DOM_Entity does not add
any additional members and do the following:
if(node.getNodeType() != NODE_ENTITY) {
throw Something();
}
//
// not safe since DOM_Node isn't a DOM_Entity
// but works
DOM_Entity& entity = (DOM_Entity&) node;
Using <dynamic_cast> won't work since
node isn't really a DOM_Entity.
There was a pretty lengthy discussion on
this about two months ago.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]