<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    Hello Stéphane,<br>
    <br>
    <div class="moz-cite-prefix">On 2021-11-04 19:35, Stéphane Charette
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CA+HxBUJHibwPpW-iJiJYnNLher5Si4_a=y4q2B=ExfjMZsVQaA@mail.gmail.com">
      
      <div dir="ltr">
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div>[...] First get the list of VM UUIDs with "VBoxManage
              list vms", and then get the detail information you need
              with "VBoxManage showvminfo uuid --machinereadable". The
              output of the latter should be a lot easier to process.</div>
          </blockquote>
          <div><br>
          </div>
          <div>The irony here (to me anyway) is that the XML file should
            be very easy to read and parse by machine.  Other than
            having a database, file formats like XML and JSON are meant
            to be used that way.</div>
        </div>
      </div>
    </blockquote>
    <br>
    Yes, XML is machine parseable.<br>
    <br>
    However, the XML files containing the VirtualBox VM registry and the
    VM configuration have by now evolved for about 17 years. Showing all
    kinds of human imperfection, i.e. various forms of misdesign which
    survived more or less long. The current XML parser code used in
    VirtualBox is supposed to understand config files back to VirtualBox
    2.0 (covering 13 years).<br>
    <br>
    If one wants to extract only very specific information (more or less
    just VM names and groups) then it is probably little effort, but a
    complete parser is much work (and due to our policy of upgrading the
    XML representation to a newer version only if a new feature is
    actually used one simply can't ignore the past).<br>
    <br>
    VM groups were introduced with VirtualBox 4.2, and if one didn't
    actively use them then the attribute may not be there.<br>
    <br>
    If Bernard decides to go for XML parsing it could be actually much
    less effort than picking the few needed bits of information from the
    output of VBoxManage. At the same time efficient and a good chance
    to be future proof since the attributes needed are in very stable
    areas of the XML. Of course there are details to take care of (like
    finding VirtualBox.xml for VirtualBox installs which existed for a
    long time, before it moved to the .config/VirtualBox directory and
    how to interpret relative paths for machine config files (relevant
    if someone kept his VM organization from the old days when we didn't
    have per-VM subdirectories).<br>
    <br>
    Klaus<br>
    <br>
    <blockquote type="cite" cite="mid:CA+HxBUJHibwPpW-iJiJYnNLher5Si4_a=y4q2B=ExfjMZsVQaA@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div>Stéphane</div>
          <div><br>
          </div>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div>
              <table cellspacing="0" cellpadding="0" border="0">
                <tbody>
                  <tr>
                    <td style="line-height:0;vertical-align:bottom;padding-right:10px;padding-top:20px;padding-bottom:20px" width="107" valign="bottom" align="left"><a href="https://urldefense.com/v3/__https://about.me/stephane.charette?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=thumb__;!!ACWV5N9M2RV99hQ!cYeC1vEy0fSyFXVLMHZJc4T_R-y1OeEwmzeM_D8ZcCeuguT8YtgcxYDaMERoJlQb_hNn$" target="_blank" moz-do-not-send="true"> <img src="https://thumbs.about.me/thumbnail/users/s/t/e/stephane.charette_emailsig.jpg?_1613974105_595" alt="" style="margin: 0px; padding: 0px;
                          display: block; border: 1px solid rgb(238,
                          238, 238);" moz-do-not-send="true" width="105" height="70"></a> </td>
                    <td style="line-height:1.1;vertical-align:bottom;padding-top:20px;padding-bottom:20px" valign="bottom" align="left"><img src="https://about.me/t/sig?u=stephane.charette" style="border: 0px; margin: 0px; padding: 0px;
                        overflow: hidden;" moz-do-not-send="true" width="1" height="1">
                      <div style="font-size:18px;font-weight:bold;color:rgb(51,51,51);font-family:"Proxima
                        Nova",Helvetica,Arial,sans-serif">Stéphane
                        Charette</div>
                      <a href="https://urldefense.com/v3/__https://about.me/stephane.charette?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=thumb__;!!ACWV5N9M2RV99hQ!cYeC1vEy0fSyFXVLMHZJc4T_R-y1OeEwmzeM_D8ZcCeuguT8YtgcxYDaMERoJlQb_hNn$" style="font-size:12px;color:rgb(43,130,173);font-family:"Proxima
                        Nova",Helvetica,Arial,sans-serif" target="_blank" moz-do-not-send="true">about.me/stephane.charette</a></td>
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#666666"> <!-- This signature was generated by the MyDesktop Oracle Business Signature utility version 6.0 --></font>
  </body>
</html>