human machine
Chieftain
- Joined
- Jan 25, 2009
- Messages
- 32
I've been doing a bunch of XML work on my mod, and I keep getting tripped up by numerous simple spelling errors.
After some googling, I've found that xml can be validated with .xsd schema
Does anyone around here use xsd to validate their mod xml files?
MS Visual Studio (and therefore ModBuddy) will create xsd files from xml. Using the Civ5 vanilla xml, I've created some xsd files, which after some editing and literature reading, will give me blue squiggly lines under misspelled elements in my xml files.
And I've figured out how to list possible values for named elements.
Without a schema applied my art style prefex: MED_awesome is ignored
(first screenshot), but when I add
to the xsd schema, I get the squiggly blue line (second screenshot)
I've started adding values for other elements (there are 93 building types!), but the developers must have made xsd files like these.
Are there any xsd files out there already?
or are there tools that would make these things automatically so I don't have write in all the values by hand?


After some googling, I've found that xml can be validated with .xsd schema
Does anyone around here use xsd to validate their mod xml files?
MS Visual Studio (and therefore ModBuddy) will create xsd files from xml. Using the Civ5 vanilla xml, I've created some xsd files, which after some editing and literature reading, will give me blue squiggly lines under misspelled elements in my xml files.
And I've figured out how to list possible values for named elements.
Without a schema applied my art style prefex: MED_awesome is ignored
(first screenshot), but when I add
Code:
<xs:element name="UnitAIType" type="UnitAIInfos"/>
<xs:simpleType name="ArtStyleSuffixInfos">
<xs:restriction base="xs:string">
<xs:enumeration value="_EURO"/>
<xs:enumeration value="_AFRI"/>
<xs:enumeration value="_AMER"/>
<xs:enumeration value="_ASIA"/>
<xs:enumeration value="_MED"/>
</xs:restriction>
</xs:simpleType>
to the xsd schema, I get the squiggly blue line (second screenshot)
I've started adding values for other elements (there are 93 building types!), but the developers must have made xsd files like these.
Are there any xsd files out there already?
or are there tools that would make these things automatically so I don't have write in all the values by hand?

