There is no guarantee of validity after the function has returned, so yes,
you have to copy anything you can't use right away.
If it didn't work that way, the parser would be required to store
everything in memory for the duration of the parse, which would really ruin
efficiency.

Dave



                                                                                       
        
                    Michael                                                            
        
                    Cervantes              To:     "'[EMAIL PROTECTED]'"     
        
                    <mcervantes@net        <[EMAIL PROTECTED]>               
        
                    speak.com>             cc:     (bcc: David N Bertoni/CAM/Lotus)    
        
                                           Subject:     Lifetime of arguments passed 
to SAX    
                    07/06/2001             callbacks                                   
        
                    01:24 PM                                                           
        
                    Please respond                                                     
        
                    to xerces-c-dev                                                    
        
                                                                                       
        
                                                                                       
        




New to the list...hello all...I've been using Xerces for a few months now
and am pretty impressed.

I have a question regarding the "XMLCh*" and "Attributes" instances passed
to ContentHandler::startElement().  How long are these references
guaranteed
to be valid?  Can I store them off (as is) until
ContentHandler::endDocument() is called?

If not, it seems like I should be able to, given the highly inefficient
alternative of making my own copy of everything I need.

Thanks in advance...


Michael Cervantes
Associate Engineer
Netspeak Corporation


---------------------------------------------------------------------
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