To me it looks that it should be a == instead of a != in the following code in the documentation: DOMNode* n = root->_node (); assert (n->getNodeType () != DOMNode::ELEMENT_NODE); DOMElement* re = static_cast<DOMElement*> (n); Copied from: http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#5.1 cheers, Erik Sjölund