Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xerces advanced usage - progresss, random access etc

From: Joe Kesselman <keshlam-nospam@-------.--->
To: 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent