You could use a SAX2XMLReader to read out interesting sub trees into temporary DOMDocument instances. For instance, check out this public domain source code: http://scm.codesynthesis.com/?p=xsd/xsd.git;a=blob;f=examples/cxx/tree/streaming/parser.cxx;hb=HEAD cheers Erik Sjölund
On Wed, May 29, 2013 at 11:23 AM, Rahul Shivangi <rahulshiva...@gmail.com>wrote: > Hi, > > currently I am using xerces 2.7 for parsing xml file. Usually my xml file > is of big size about 30-50 MB, parsed DOM tree takes large memory approx. > 600-800 MB, which is not feasible for me. > > Also I wanted to know is there any way to parse only some part of xml file > using DOM parser. SAX parser is not applicable for me, as I need to > manipulate parsed xml data. > > Thanks, > Rahul Shivangi. >