473,396 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 : gi*************@persistent.co.in
PH. (O) : 020-25678900 extn. 2364
Jul 20 '05 #1
1 1786
As I understood, only the DOM API needs the entire data into memory, not SAX.
-
gc*******@gmail.com (Girish) wrote in message news:<ac**************************@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 : gi*************@persistent.co.in
PH. (O) : 020-25678900 extn. 2364

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bugbear | last post by:
Subject pretty much says it all. I'd like to parse XML (duh!) using Xerces (because its fast, and reliable, and comprehensive, and supports lots of features). I'd like to conform to standards...
0
by: Michael Alers | last post by:
Hi, I have the problem switching off the "loading of external DTD" feature while transforming xml/xslt with XALAN. The used xml-parser is XERCES. I know how to switch off this feature when only...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
3
by: Girish | last post by:
Hi All, I have written a component(ATL COM) that wraps Xerces C++ parser. I am firing necessary events for each of the notifications that I have handled for the Content and Error handler. The...
3
by: Nobody | last post by:
I'm trying to put together code to deal with a SOAP with attachements response, and I'd like to process the response in a single pass. The SOAP with attachments specification returns XML in a MIME...
3
by: Raphael Tagliani | last post by:
(english version below) Bonjour! Je travaille sur un gros projet java, qui parse beaucoup de fichiers xml au lancement d'un serveur. Nous avons un problème de concurrence qu lancement. En...
10
by: Simon Brooke | last post by:
The DOM API has included public Node importNode(Node,boolean) as a method of the Document interface for a long time. Does anything actually implement it? Xerces 2 is giving me: ...
3
by: Dhirendra Singh | last post by:
I am new to xml parsing concept. can anyone suggest good books on Xerces C++ parsers. API documentation provided by apache is very raw and i do not find it very useful.
2
by: Boris Kolpackov | last post by:
Hi, I am pleased to announce the availability of Apache Xerces-C++ 3.0.0. Xerces-C++ is an open-source validating XML parser written in a portable subset of C++. It provides DOM (level 1, 2, and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.