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 etcTo: NULL Date: 9/4/2006 10:30:00 PM Kza wrote: > Feature 1: A progress display. The SAX APIs can be persuaded to give line/column information, though unless you know how many lines there were in the file before you stared parsing it that doesn't do you any good. Look at the Locator API. The DOM assumes reading the file is a single operation, so the concept of getting incremental details doesn't make much sense. You *could* plug in a stream filter between wherever the file is being read from and the parser, and set up that filter so it counts characters going by -- that's going to give you only a very rough progress indication, and again it requires that you know the length before you start if you want to report it as a percentage-complete number. > Feature 2: Loading only a "screenful" of the file at a time. "Screenful" is not defined in XML. Nor is starting parse from the middle of a file. You could try to do something with incremental processing, via throttling of ta SAX stream -- I've done that in the past -- but keeping track of when enough has been read to fill a screen and when more would have to be read to fill the next screen is very much an application problem rather than a parser problem. Random-access to an XML model isn't a problem -- the DOM can do that, though again it isn't designed to operate on screenfuls -- but random-order parsing really doesn't make sense. Namespaces are context-dependent, to take one major point where that idea breaks down. -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
