Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > What is the mechanism that Xerces C++ follows for parsing a Stream?

Reply
Thread Tools

What is the mechanism that Xerces C++ follows for parsing a Stream?

 
 
Girish
Guest
Posts: n/a
 
      04-11-2005
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 : http://www.velocityreviews.com/forums/(E-Mail Removed)
PH. (O) : 020-25678900 extn. 2364
 
Reply With Quote
 
 
 
 
Fabien R
Guest
Posts: n/a
 
      04-14-2005
As I understood, only the DOM API needs the entire data into memory, not SAX.
-
(E-Mail Removed) (Girish) wrote in message news:<(E-Mail Removed). 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 : (E-Mail Removed)
> PH. (O) : 020-25678900 extn. 2364

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade of Xalan 1.2.2 and Xerces 1.4.4 to Xalan 2.6 and Xerces 2.6.2 cvissy XML 0 11-16-2004 07:06 AM
How to Disable activation follows mouse? Dave Computer Support 19 10-24-2004 01:11 PM
IE6 can't follows links to .zip or .exe files DD Computer Support 2 04-11-2004 06:11 PM
My app runs too slow (lots of code follows) Mikey Java 7 12-12-2003 08:54 PM
Swen worm problems follows newsletter. Patrick Casher Computer Support 1 11-11-2003 02:21 PM



Advertisments