The problems were twofold:
1) I was not correctly allowing for split chunks (multiple data() calls).
2) I need to have table data as it is, now.
Almost fixed. But, the kids are up and it's time for breakfast...
Jon
OK, I fixed the problem. Here's what I do now in FGXMLParse (my
Jon Berndt wrote:
OK, I fixed the problem. Here's what I do now in FGXMLParse (my
XMLVisitor-derived class):
startElement():
Here I simply set the working string to the null string.
data():
Here I append the string that is passed in to the current working string,
working_string += string(s,
That sounds like the right approach to me (and I'm an expert because I
took a compilers class 15 years ago and we used the Dragon book.) :-)
Curt.
I stayed at a Holiday Inn Express, once ...
:-)
Jon
___
Flightgear-devel mailing list
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.
David
OK, I think I've figured out what the mitigating circumstance
On Wed, 29 Dec 2004 08:06:13 -0600, Jon Berndt [EMAIL PROTECTED] wrote:
It appears that entire tables could be read in as one data chunk. I need to
do processing
in that case and manually separate the data rows. I think I've almost got
this one
figured out.
Sounds good. The main problem
On Wed, 29 Dec 2004 08:06:13 -0600, Jon Berndt [EMAIL PROTECTED] wrote:
It appears that entire tables could be read in as one data chunk. I need to
do processing
in that case and manually separate the data rows. I think I've almost got
this one
figured out.
Sounds good. The main
I've encountered an unexpected problem with the class I have derived
from EasyXML. In one of the configuration files I have, the following
lines are present:
function NAME=aero/coefficient/Cndr
descriptionYaw moment due to rudder/description
product
On Tuesday 28 December 2004 19:43, Jon S Berndt wrote:
I've encountered an unexpected problem with the class I have derived
from EasyXML. In one of the configuration files I have, the following
lines are present:
function NAME=aero/coefficient/Cndr
On Tue, 28 Dec 2004 12:43:27 -0600, Jon S Berndt [EMAIL PROTECTED] wrote:
So, I guess I've been lucky so far that the data I have gotten -
except in this particular case - has been chunked together. I'm a
little stumped as to how I can make sure that I get all the data for
an element and
On Tue, 28 Dec 2004 16:07:19 -0600, Jon Berndt [EMAIL PROTECTED] wrote:
I thought that sounded reasonable and tried that this morning. But, it still
doesn't seem
to work - in fact (at least the way I'm doing it) it seems worse that way. A
quick glance
seems to suggest (rightly or wrongly)
On December 28, 2004 05:07 pm, Jon Berndt wrote:
I thought that sounded reasonable and tried that this morning. But, it
still doesn't seem to work - in fact (at least the way I'm doing it) it
seems worse that way. A quick glance seems to suggest (rightly or wrongly)
that _everything is treated
Make sure you blank the string at the start tag.
David
Here's what's in the Traffic Manager:
void FGTrafficManager::data (const char * s, int len)
{
string token = string(s,len);
if (( token.find( ) == string::npos
(token.find('\n')) == string::npos))
{
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;
}
: [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
14 matches
Mail list logo