Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyInput
- {
- [System.Xml.Serialization.XmlArrayItem("Demographic")]
- public DemographicsInfo[] Demographics {get; set;}
- }
- public class DemographicsInfo
- {
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Name { get; set; }
- public string Value { get; set; }
- }
- <Demographics>
- <Demographic Name="String">
- <value>string</value>
- </Demographic>
- <Demographic Name="String">
- <value>string</value>
- </Demographic>
- </Demographics>
- <Demographics>
- <Demographic Name="String">string</Demographic>
- <Demographic Name="String">string</Demographic>
- </Demographics>
- xsd foo.xml
- xsd foo.xsd /classes
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Runtime Version:2.0.50727.3053
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
- using System.Xml.Serialization;
- //
- // This source code was auto-generated by xsd, Version=2.0.50727.3038.
- //
- /// <remarks/>
- [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
- [System.SerializableAttribute()]
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
- public partial class Demographics {
- private DemographicsDemographic[] itemsField;
- /// <remarks/>
- [System.Xml.Serialization.XmlElementAttribute("Demographic", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)]
- public DemographicsDemographic[] Items {
- get {
- return this.itemsField;
- }
- set {
- this.itemsField = value;
- }
- }
- }
- /// <remarks/>
- [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
- [System.SerializableAttribute()]
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class DemographicsDemographic {
- private string nameField;
- private string valueField;
- /// <remarks/>
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Name {
- get {
- return this.nameField;
- }
- set {
- this.nameField = value;
- }
- }
- /// <remarks/>
- [System.Xml.Serialization.XmlTextAttribute()]
- public string Value {
- get {
- return this.valueField;
- }
- set {
- this.valueField = value;
- }
- }
- }
- [System.Xml.Serialization.XmlText()]
- public string Value { get; set; }
Add Comment
Please, Sign In to add comment