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
As far as I can tell, there is no SimGear-devel list, so I'm asking
this here.
I'm probably going to toy with EasyXML for a C++ side project I'm
working on - and if that goes well, perhaps think about using it with
JSBSim as well. I am guessing that I ought to be able to grab the
EasyXML
Jon S Berndt wrote:
I don't want to burden anyone with any handholding request, but any
pointers on where the best documentation is (I am currently reviewing
the docs at simgear.org), which files -- other than the EasyXML files
themselves -- in the FlightGear tree should I peruse, and any
Seamus Thomas Carroll wrote:
Good point. I now understand how to read xml from a file but I cant
figure out how to read xml from a char *. When a client recieves an
xml document from the server it will read it into a char *buffer.
Is it possible to then parse buffer using the
Seamus Thomas Carroll wrote:
Is it possible to then parse buffer using the property-tree code?
I am looking at void readProperties( istream input,
SGPropertyNode *start_node, const string base ) but i dont understand
what the base is for.
You could pass it an istringstream wrapped around the
Good point. I now understand how to read xml from a file but I cant
figure out how to read xml from a char *. When a client recieves an
xml document from the server it will read it into a char *buffer.
Is it possible to then parse buffer using the property-tree code?
I am looking at void
I looked at the code for readxml and the path is simply a descriptor for
the document being parsed (ie file name) and does not effect the parsing.
The new question is how to cast? the char * to an istream?
Seamus
On Tue, 18 Nov 2003, Seamus Thomas Carroll wrote:
Good point. I now
Hi,
Is there a tutorial or can someone give or direct me to a simple example
on how to use easyxml? I am trying to work my way through props_io.cxx
but it is not an easy introduction.
Seamus
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
Seamus Thomas Carroll wrote:
Is there a tutorial or can someone give or direct me to a simple example
on how to use easyxml? I am trying to work my way through props_io.cxx
but it is not an easy introduction.
Do you want to work with properties or raw, low-level XML? Properties
provide a
I figured out the what you mention. The part that confuses me is how to
put the data from the xml file in a desired location. For example if I
have the xml document:
...
vehicle
id1/id
lon-128.553223/lon
lat54.233123/lat
/vehicle
...
How does id, lon, lat initialize the variables int
Seamus Thomas Carroll wrote:
I figured out the what you mention. The part that confuses me is how to
put the data from the xml file in a desired location. For example if I
have the xml document:
...
vehicle
id1/id
lon-128.553223/lon
lat54.233123/lat
/vehicle
...
How does id, lon, lat
24 matches
Mail list logo