Configuration 4 GNU (CFG)


An example

Prev   Next

To help understand the XML structure specified by this document, please examine the following INI-type file and the resulting XML specification.

Example 1. An INI-style configuration file
[global]
local master = false
os level = 0
wins server = 153.42.16.10
security = share
workgroup = mellinger

[public]
path = /home/jason/public
writeable = false
guest ok = true

Following is the equivalent XML representation of this data.

Example 2. The XML representation of the INI file
<inifile>
 <inisection sectionname="global">
  <property name="local master"><value>false</value></property>
  <property name="os level"><value>0</value></property>
  <property name="wins server"><value>153.42.16.10</value></property>
  <property name="security"><value>share</value></property>
  <property name="workgroup"><value>mellinger</value></property>
 </inisection>
 <inisection sectionname="public">
  <property name="path"><value>/home/jason/public</value></property>
  <property name="writeable"><value>false</value></property>
  <property name="guest ok"><value>true</value></property>
 </inisection>
</inifile>

This XML representation contains one root node with two child nodes. The two child nodes represent the two sections in the INI file. Attached to the two sections are various properties. The following diagram shows this data model.

Figure 2. Representation of the example

Representation of the example
Prev Up Next
Config4GNU XML Specification Home Document Structure

SourceForge Logo