Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - xerces advanced usage - progresss, random access etc >Thread Next - Re: xerces advanced usage - progresss, random access etc Re: xerces advanced usage - progresss, random access etcTo: NULL Date: 9/8/2006 2:35:00 PM "Kza" <kzawah@g...> writes: > Feature 1: A progress display. I have tried a few times now to find a > way of asking xerces how far through a file it is in bytes, but no > luck. (I did try a per element check, but that involves a whole extra > parse at the start just to count the elements). I have tried using the > LocalFileInputSource, and getting its BinInputStream and calling itc > curPos, but its always 0. > > Any ideas? You can implement your own InputStream which will keep track of how much data Xerces-C++ has consumed so far. Combine this with the total length of the file and you can calculate the progress. > Feature 2: Loading only a "screenful" of the file at a time. I also > would like some sort of random access functionality, so if the user > scrolls down to 75% of the file, the parser skips forward to that > position and starts reading there, and when they scroll back up it goes > up and reads just that little bit of the file. This one would definitely be easier with an in-memory model (e.g., DOM). hth, -boris -- Boris Kolpackov Code Synthesis Tools CC http://www.codesynthesis.com Open-Source, Cross-Platform C++ XML Data Binding | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
