Jump to content
Sign in to follow this  
JamesDover

Saving Output As INI or XML Format

Recommended Posts

JamesDover

Which seems to save faster an INI or a XML? Also what is the better choice?

Cheers.

Share this post


Link to post
Share on other sites
weaponx

This is very subjective.

INI files don't have much freedom. There is something like a 64kb filesize limitation imposed by windows, and also like a 255 character limit on values.

XML isn't supported natively by AutoIt so you will have to rely on an included UDF to work with it.

XML allows the user to define the structure. Here is a small example:

<?xml version="1.0" encoding="iso-8859-1"?>
  <root>
      <folder name="Windows">
          <file name="calc.exe" size=""/>
          <folder name="System32">
              <file name="cmd.exe" size="388608"/>
          </folder>
      </folder>
      <folder name="Program Files">
          <folder name="AutoIt3">
              <folder name="Examples">
                  <folder name="GUI">
                  </folder>
              </folder>
              <folder name="Includes">
              </folder>
          </folder>
      </folder>
  </root>

XML nodes are essentially like structure objects. You can play god with them. The following 2 examples will produce the same results.

Node value storage:

<root>
     <folder>
         <name>Windows</name>
         <file>
             <name>explorer.exe</name>
             <size>1033216</size>
         </file>
     </folder>
 </root>

Attribute storage:

<root>
     <folder name="Windows">
         <file name="explorer.exe" size="1033216"/>
     </folder>
 </root>

How would you translate this to ini?? You could probably only do it with multiple ini files and it would be a logistical nightmare.

Edited by weaponx

Share this post


Link to post
Share on other sites
JamesDover

Cheers

This is very subjective.

INI files don't have much freedom. There is something like a 64kb filesize limitation imposed by windows, and also like a 255 character limit on values.

XML isn't supported natively by AutoIt so you will have to rely on an included UDF to work with it.

XML allows the user to define the structure. Here is a small example:

<?xml version="1.0" encoding="iso-8859-1"?>
  <root>
      <folder name="Windows">
          <file name="calc.exe" size=""/>
          <folder name="System32">
              <file name="cmd.exe" size="388608"/>
          </folder>
      </folder>
      <folder name="Program Files">
          <folder name="AutoIt3">
              <folder name="Examples">
                  <folder name="GUI">
                  </folder>
              </folder>
              <folder name="Includes">
              </folder>
          </folder>
      </folder>
  </root>

XML nodes are essentially like structure objects. You can play god with them. The following 2 examples will produce the same results.

Node value storage:

<root>
     <folder>
         <name>Windows</name>
         <file>
             <name>explorer.exe</name>
             <size>1033216</size>
         </file>
     </folder>
 </root>

Attribute storage:

<root>
     <folder name="Windows">
         <file name="explorer.exe" size="1033216"/>
     </folder>
 </root>

How would you translate this to ini?? You could probably only do it with multiple ini files and it would be a logistical nightmare.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.