You can translate your XML data with a XSL transformation into a form which can be validated with a XSD schema. This does not require any special custom tools.
Your input data:
<?xml version="1.0" encoding="UTF-8"?>
<users>
<user key="username" value="Test"/>
<user key="age" value="27"/>
<user key="email" value="my@my.com"/>
</users>
Can be translated with the following transformation:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/users">
<users>
<xsl:apply-templates/>
</users>
</xsl:template>
<xsl:template match="//user">
<xsl:variable name="key" select="@key"/>
<xsl:variable name="value" select="@value"/>
<xsl:element name="{$key}">
<xsl:value-of select="$value"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
into the following form:
<?xml version="1.0" encoding="UTF-8"?>
<users>
<username>Test</username>
<age>27</age>
<email>my@my.com</email>
</users>
And that can easily be validated with a standard XSD schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="users">
<xs:complexType>
<xs:sequence>
<xs:element name="username" type="xs:string"/>
<xs:element name="age" type="xs:positiveInteger"/>
<xs:element name="email">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value=".+@.+\.[^.]+"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>