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

Discussion in 'XML' started by Girish, Apr 11, 2005.

  1. Girish

    Girish Guest

    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 :
    PH. (O) : 020-25678900 extn. 2364
     
    Girish, Apr 11, 2005
    #1
    1. Advertising

  2. Girish

    Fabien R Guest

    As I understood, only the DOM API needs the entire data into memory, not SAX.
    -
    (Girish) wrote in message news:<>...
    > 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 :
    > PH. (O) : 020-25678900 extn. 2364
     
    Fabien R, Apr 14, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mikey
    Replies:
    7
    Views:
    825
    Mikey
    Dec 12, 2003
  2. cvissy
    Replies:
    0
    Views:
    624
    cvissy
    Nov 16, 2004
  3. Hari
    Replies:
    3
    Views:
    408
    Edward Elliott
    May 12, 2006
  4. Replies:
    1
    Views:
    383
  5. celsius

    another method is as follows

    celsius, Jan 5, 2005, in forum: C Programming
    Replies:
    0
    Views:
    291
    celsius
    Jan 5, 2005
Loading...

Share This Page