OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: expat question: processStream vs processFile/filemap

[ Lists Home | Date Index | Thread Index ]
  • From: James Clark <jjc@jclark.com>
  • To: "Xml-Dev (E-mail)" <xml-dev@ic.ac.uk>
  • Date: Mon, 04 May 1998 17:03:12 +0700

James K. Tauber wrote:
> 
> As I've mentioned before, I'm writing some documentation for expat and I'm
> currently doing a walkthrough of xmlwf. My lack of knowledge of C file I/O
> is letting me down.
> 
> Can somebody who has worked with the expat source (or who is at least
> willing to have a quick look at xmlwf.c) tell me what the difference is
> between using processStream and using processFile/filemap? Why is it a
> command-line option?
> Why would you pick one over the other?

Using file mapping is typically more efficient, but you might need to
use processStream if:

- your OS doesn't support file mapping (although xmlwf can fake it by
reading the entire file into memory)

- you don't want to deal with the portability problems that using file
mapping brings

- you have files larger than can be mapped (eg > 2Gb)

- you are reading from a network connection or pipe rather than a file

It's a command-line option for testing purposes.

James



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS