Results 1 to 3 of 3

Thread: XmlMono Class

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,016

    XmlMono Class

    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.


    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
    Attached Files Attached Files

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,016

    Re: XmlMono Class

    Revision 2
    I forgot to unclude numbers and period, hyphen and uderscore for names
    Attached Files Attached Files

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,016

    Re: XmlMono Class

    XmlMono2
    This has more methods. I use it for extraction data from excel files (xlsx).
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width