juracist
24th May 2012, 01:21
How to parse huge XML file (up to 8GB!) in Qt?
It can't be DOM approach, because it takes too much memory, so is there any efficient and quick parser to deal with it?
My XML file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<prog name="MST">
<kaffe/>
<c n="java/lang/Object" s="" r="0" />
<c n="java/lang/Object" s="" r="0" />
<n a="8184954" y="java/lang/String$ICComp" s="5" t="0" />
<n a="8184824" y="java/lang/RuntimePermission" s="15" t="14" />
<d a="8184954" t="14" />
<c n="java/lang/Object" s="" r="0" />
<n a="8184954" y="[C" s="25" d="1" m="15" t="2c" />
<d a="8184824" t="37" />
<d a="8184954" t="37" />
</prog>
Elements I need are "n" and "d", and attributes "a", "s" and "t".
It can't be DOM approach, because it takes too much memory, so is there any efficient and quick parser to deal with it?
My XML file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<prog name="MST">
<kaffe/>
<c n="java/lang/Object" s="" r="0" />
<c n="java/lang/Object" s="" r="0" />
<n a="8184954" y="java/lang/String$ICComp" s="5" t="0" />
<n a="8184824" y="java/lang/RuntimePermission" s="15" t="14" />
<d a="8184954" t="14" />
<c n="java/lang/Object" s="" r="0" />
<n a="8184954" y="[C" s="25" d="1" m="15" t="2c" />
<d a="8184824" t="37" />
<d a="8184954" t="37" />
</prog>
Elements I need are "n" and "d", and attributes "a", "s" and "t".