xml, xsd structure

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, I have the following xml file, the element <version/> will always be present. the <setting> can have a cardinality of 0 -> *<?xml version="1.0" encoding="utf-8"?>
<configuration>
<version />
<setting name="ProductionDBConnectionString" serializeAs="System.String" editor="ConnectionStringEditor" converter="" encrypted="True
<value>lirykLGRhPQ+twgutVHrGDECNk8+fVgbWWiQnH/fr18w1pDfI5UHVr9NFvBy8d4dgDBo6Umdn0oH9kuKKQqAi498CBlDFFRHvHtSJhBOKvg=</value>
</setting>
<setting name="TestDBConnectionString" serializeAs="System.String" editor="ConnectionStringEditor" converter="" encrypted="True
<value>lirykLGRhPQ+twgutVHrGDECNk8+fVgbWWiQnH/fr1+C43DXTW2R2T3ldQui2iUCzaez4iJ/A0B1hQlvH8fjbVoYe27vp19WnNdlENmN1wJx99xJ3NJcr11akaVl7/Lx</value>
</setting>
</configuration>
and my xsd file<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified

<xsd:element name="configuration" type="ConfigurationType"/>

<xsd:complexType name="ConfigurationType
<xsd:all>
<xsd:element name="version" minOccurs="1" maxOccurs="1"/>
<xsd:element name="setting" type="settingType"/>
</xsd:all>
</xsd:complexType>

<xsd:complexType name="settingType
<xsd:sequence>
<xsd:element name="value"/>
</xsd:sequence>
<xsd:attribute name="name" use="required"/>
<xsd:attribute name="serializeAs" use="required"/>
<xsd:attribute name="editor" use="required"/>
<xsd:attribute name="converter" use="required"/>
<xsd:attribute name="encrypted" use="required"/>
</xsd:complexType>

</xsd:schema>
thanks
Gary

View the full article
 

Similar threads

Back
Top