I am working on some exports from Autodesk Inventor, as xlsx files. So I start to program in Vb6 to make something to handle these xlsx files (without using excel as object). To read xml files from xlsx I get the cZipArchive from wqweto. Works fine, without leaks. I can't say the same for the msxml2. I do a test of opening 100 times two xml files, (one for geting the strings, because strings are separete from sheet), and at 25 iteration, I got a message no other memory for threads. So I turn the other way to implement the same functionality if i could.
This is my work, and have no leaks, 100X100 times or more, no problem.
There is one module with the test program, and the class.
You can make it whatever you want. No load or save to file. One class make the tree. There are collections for siblings. Also the node is a variant array inside the tree.
This is my work, and have no leaks, 100X100 times or more, no problem.
There is one module with the test program, and the class.
You can make it whatever you want. No load or save to file. One class make the tree. There are collections for siblings. Also the node is a variant array inside the tree.
Code:
test
3
69
70
71
69 element
codename VB6
sold 2
70 element
codename C++
sold 3
71 element
codename M2000
sold 10
beautify -2
<?xml version="1.0" encoding="UTF16"?>
<names>
<element id="69">
<codename>VB6</codename>
<sold>2</sold>
</element>
<element id="70" Nobel="yes">
<codename><![CDATA[C++]]></codename>
<sold>3</sold>
</element>
<element id="71">
<codename>M2000</codename>
<sold>10</sold>
</element>
</names>
beautify 4
<?xml version="1.0" encoding="UTF16"?>
<names>
<element id="69">
<codename>VB6</codename>
<sold>2</sold>
</element>
<element id="70" Nobel="yes">
<codename><![CDATA[C++]]></codename>
<sold>3</sold>
</element>
<element id="71">
<codename>M2000</codename>
<sold>10</sold>
</element>
</names>
L.Xml = k.Xml
Print L.Xml
<?xml version="1.0" encoding="UTF16"?>
<names>
<element id="69">
<codename>VB6</codename>
<sold>2</sold>
</element>
<element id="70" Nobel="yes">
<codename><![CDATA[C++]]></codename>
<sold>3</sold>
</element>
<element id="71">
<codename>M2000</codename>
<sold>10</sold>
</element>
</names>
I found it
<sold>2</sold>
Get a list of all nodes with same tag
1 VB6
2 C++
3 M2000