[xsd-users] FW: map files and extended types...

Dingelstad, John john.dingelstad at dhv.com
Mon Jul 19 13:30:56 EDT 2010


Hi Boris,

Too many tools allow for simple things to be done in to many different ways!

I like your tools, but they also make sometimes wondering whether I am doing things the right way, each time i discover something new. There is nothing wrong with that, but sometimes, I feel I am spending more time understanding all the bells and whistles of the xsd tools than on working on my actual problem... Guess it's all part of the learning curve.

Anyway, maybe you could tell me your opinion on what the best approach would be in my case:

Basically, I get 2 DATEX files delivered. One which contains a measured data publication and which indirect refers to the other file which contains the measured site table publication. The measured data publication (approx. 1GB large) contains all kinds of measurement data records, which I shall process and store into a database and in order to do so, I need info from the measurement site table publication.

Due to the large size of the measured dat publication, I choose the C++ parser approach. First I will parse the measurement site table publication and create an internal data structure of only that data in which I am actually interested in. This is something I've nearly finished. The 2nd step would be parse the measured data publication. Once I've collected/parsed a record, I could do the necessary processing in one of the callback functions.

BTW is there a way to pass on some extra data to the parser? I.e. I'll need to access the data I previously collected from the measurement site table publication within the parser callback functions  when I've collected a measurement data record. Sure it can be done through some global variables but that wouldn't be the nicest way I can think of.

Regards,
John 


-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Mon 19-7-2010 16:43
To: Dingelstad, John
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] FW: map files and extended types...
 
Hi John,

Dingelstad, John <john.dingelstad at dhv.com> writes:

> Yes, I have considered C++ Tree, but given the fact that I get XML files
> which can be >1GB in size, it's just not going to work as I sooner or
> later will hit the 3GB barrier on windows. Therefore, I went with C++
> Parser as it allows me to process and discard each dataset that has been
> retrieved from the input file.

You can do that with C++/Tree as well. See the 'streaming' example in
the examples/cxx/tree/ directory.


> I'll haven't looked at Hybrid as it was/seems to be targeted towards
> embedded applications.

Configured with STL, iostream, and C++ exceptions enabled, C++/Hybrid
is quite suitable for general-purpose applications, especially those
looking for small footprint and runtime memory consumption. It also 
supports partially in-memory processing (in fact, C++/Hybrid is built
on top of C++/Parser). There is also the 'streaming' example that shows
how to accomplish this.

Boris



More information about the xsd-users mailing list