I am using Xerces 1.6.0 and find that quite a bit of memory is used and
retained when parsing an xml file.
The file I am using is about 500 Kbytes and running a short program that only
parses the file the memory usage is about 12 MBytes. �This is in release mode
and i need use DOM (IDOM).
Does this seem correct? �Should I be expected much greater memory efficiency?
Does it make a difference with the depth of the elements in the tree?
The simple program I wrote to test this is as follows.
� � � � � � � � parser = new IDOMParser;
� � � � � � � � parser->setIncludeIgnorableWhitespace(false);
� � � � � � � � parser->setCreateEntityReferenceNodes(false);
� � � � � � � � //parser->setValidationConstrainFatal(true);
� � � � � � � � parser->setDoSchema(false);
� � � � � � � � parser->setValidationScheme(IDOMParser::Val_Auto);
� � � � � � � � parser->setValidationSchemaFullChecking(false);
� � � � � � � � parser->setDoNamespaces(false);
� � � � � � � � const char* xmlFile = "prefixos.xml";
� � � � � � � � parser->parse(xmlFile);
XML file example:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE tarifador [
<!ELEMENT tarifador (prefixos+)>
<!ATTLIST tarifador
versao CDATA #REQUIRED>
<!ELEMENT prefixos (p+)>
<!ATTLIST prefixos
area_tar_origem CDATA #REQUIRED>
<!ELEMENT p EMPTY>
<!ATTLIST p
ID ID #REQUIRED
d (00 | 01 | 02 | 03 | 04 | 0C | 10 | 30 | 50) "04"
u (SC | RR | RO | PI | AP | AL | PB | SE | RN) "SP"
r (1 | 2 | 3) "1"
c (S | N) "N">
]>
<tarifador versao="0.1">
<prefixos area_tar_origem="482">
<p ID="P11201" r="3" c="S"/>
<p ID="P11202" r="3" c="S"/>
<p ID="P11203" r="3" c="S"/>
<p ID="P11204" r="3" c="S"/>
<p ID="P11206" r="3" c="S"/>
<p ID="P11209" r="3"/>
<p ID="P11215" r="3" c="S"/>
...
... 18.000 elements
...
<p ID="P11209" r="3"/>
<p ID="P11215" r="3" c="S"/>
</prefixos>
</tarifador>
Thanks in advance.
Best regards,
Paulo Pizarro
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]