How about:

   return DOM_Element();

Dave




                                                                                       
                                   
                    [EMAIL PROTECTED]                                                      
                                   
                    bm.com               To:     [EMAIL PROTECTED]           
                                   
                                         cc:     (bcc: David N Bertoni/CAM/Lotus)      
                                   
                    03/23/2001           Subject:     RE: Casting DOM_Node to 
DOM_Element                                 
                    09:40 AM                                                           
                                   
                    Please                                                             
                                   
                    respond to                                                         
                                   
                    xerces-c-dev                                                       
                                   
                                                                                       
                                   
                                                                                       
                                   




Hi, Dave,

    I've got a question for you, what shall i do in the 2nd return below?
thanks.

// Finds and returns the first child element node.
DOM_Element XUtil::getFirstChildElement(DOM_Node parent)
{
    // search for node
    DOM_Node child = parent.getFirstChild();
    while (child != 0)
     {
        if (child.getNodeType() == DOM_Node::ELEMENT_NODE)
            return static_cast<DOM_Element&>(child);        /*** 1st return
***/

        child = child.getNextSibling();
    }

    // not found
    return ???       // 2nd return

}


Regards,

Peiyong Zhang
____________________________________________
XML Parsers Development
IBM Toronto Laboratory email: [EMAIL PROTECTED]
Phone: (416)448-4088; Fax: (416)448-4414; T/L: 778-4088


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to