Hi, ALl,
I have
following two questions regarding how to use InputSource with SAX parser in
Xerces for C++.
I know I can do
something like this:
SAX2XMLReader* pParser =
XMLReaderFactory::createXMLReader();
pParser->parse(input);
Where input is an
instance of InputSource. My question is: say I have a file, I can create a
LocalFileInputSource, or read the whole file into memory buffer then create a
MemBufInputSource, which one is better? I have big input file like
20M.
Also, I've tried
both DOM and SAX parser in Xerces c++ (1.7), from Windows Task Manager, I can
see the memory usage by my process is significantly less in xml parsing phase
whe SAX Parser is used,
however, it does not
seem to me that SAX parser can handle larger input than DOM, in my case,
when the input reach 30M, both parser blow out. Any thought?
Thanks much in
advance.
Frank.