![]() |
What is the mechanism that Xerces C++ follows for parsing a Stream?
Hello..
I need to understand how parsing of a file or a stream(XML data in memory) takes place in Xerces C++. I am using SAX XMLReader and passing xml input as a file path or a MemBufInputSource object. In order to create a MemBufInputSource object I need to have the entire data in memory(as given in MemParse sample). This may create problems if I have a large amount of data, say in hundreds of MB. In case of files, does the parser read the entire file into memory and then parse it? or Does it read it in chunks? If it does it in chunks can we simulate the same for xml data in memory? What are the things to be taken care of in this case? The need to understand the mechanism arises from the requirement to progressively parse xml data by loading small chunks into the memory. Can somebody give me some pointers in this regard? Thanking you in advance! warm regards, Girish ------------------------------------- Girish Chandran Mail : girish_chandran@persistent.co.in PH. (O) : 020-25678900 extn. 2364 |
Re: What is the mechanism that Xerces C++ follows for parsing a Stream?
As I understood, only the DOM API needs the entire data into memory, not SAX.
- gchandran@gmail.com (Girish) wrote in message news:<ac4d7de5.0504110505.72400a93@posting.google. com>... > Hello.. > > I need to understand how parsing of a file or a stream(XML data in > memory) takes place in Xerces C++. I am using SAX XMLReader and passing xml > input as a file path or a MemBufInputSource object. In order to create a > MemBufInputSource object I need to have the entire data in memory(as given > in MemParse sample). This may create problems if I have a large amount of > data, say in hundreds of MB. > > In case of files, does the parser read the entire file into memory and then > parse it? or Does it read it in chunks? > If it does it in chunks can we simulate the same for xml data in memory? > What are the things to be taken care of in this case? > > The need to understand the mechanism arises from the requirement to > progressively parse xml data by loading small chunks into the memory. > Can somebody give me some pointers in this regard? > > Thanking you in advance! > > warm regards, > Girish > > ------------------------------------- > Girish Chandran > > Mail : girish_chandran@persistent.co.in > PH. (O) : 020-25678900 extn. 2364 |
| All times are GMT. The time now is 08:37 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.