Code generation from XML such as this is best achieved using XSLT. If you have libxslt installed you can use xsltproc to perform the transform. Make this a pre-build step in your build process to generate the source code.
How about this:
structs.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="zone">
<xs:complexType>
<xs:sequence>
<xs:element name="Var_name" type="xs:string"/>
<xs:element name="var_value" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="zone2">
<xs:complexType>
<xs:sequence>
<xs:element name="Var_name" type="xs:string"/>
<xs:element name="var_value" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
makestructs.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xsl:output method="text" />
<xsl:template match="/">
<xsl:for-each select="/xs:schema/xs:element">
struct <xsl:value-of select="@name" /> {
<xsl:for-each select="xs:complexType/xs:sequence/xs:element">
<xsl:choose>
<xsl:when test="@type = 'xs:string'">
char*
</xsl:when>
<xsl:when test="@type = 'xs:decimal'">
float
</xsl:when>
</xsl:choose>
<xsl:value-of select="@name" />;
</xsl:for-each>
};
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
The stylesheet is indented for readability. but you'll want to remove some whitespace so it doesn't appear in the output.