What are the assumptions I can make about the string that is passed into the call to data()?
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of David > Megginson > Sent: Tuesday, December 28, 2004 9:30 PM > To: FlightGear developers discussions > Subject: Re: [Flightgear-devel] EasyXML problem? > > > On Tue, 28 Dec 2004 19:41:55 -0600, Jon Berndt <[EMAIL PROTECTED]> wrote: > > > void FGTrafficManager::data (const char * s, int len) > > { > > string token = string(s,len); > > if (( token.find(" ") == string::npos > > && (token.find('\n')) == string::npos)) > > { > > value += token; > > } else { > > value = string(""); > > } > > } > > No, there is no guarantee that the string will be non-empty (that goes > down to the underlying XML library). Again, make sure that you set > value = "" at the start event, and then process value at the > corresponding end event. > > > All the best, > > > David > > -- > http://www.megginson.com/ > > _______________________________________________ > Flightgear-devel mailing list > Flightgear-devel@flightgear.org > http://mail.flightgear.org/mailman/listinfo/flightgear-devel > 2f585eeea02e2c79d7b1d8c4963bae2d _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d