A FIFO data structure( a queue in particular ) would be ok for what you need , on one end you could push data and on the other you can read line-by-line . I haven't tried the sax-based parser but the libraries/modules I've used in both Perl/C++ were building a tree structure in memory in which they fitted the XML , if this is what the sax-based parser does also it won't be of any use because by passing the XML in a stream you'll have a incomplete XML and thus it won't be a valid XML,but just part of a valid one(the original one you're sending through http).
To sum up , 2 threads/processes , one reading the XML from the stream , one processing the queue and filling up an entry structure, when you hit the end tag of your entry < / name_of_tag > , put it in a DB and continue. You'll also need some form of IPC and you'll need the queue to be shared among the threads/processes.
In reply to Re: Processing XML stream via HTTP
by spx2
in thread Processing XML stream via HTTP
by thistle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |