|
using System;
using System.Xml.Serialization;
using System.Collections.Generic;
namespace SqlXmlTest {
/// <summary>Represents an xml root Companies document element.</summary>
[XmlRoot("Companies")]
public class CompanyList {
private List<Company> element_company;
/// <summary>Company[] Company xml element.</summary>
[XmlElement("Company")]
public List<Company> Companies {
get { return this.element_company; }
set { this.element_company = value; }
}
}
/// <summary>Represents a Companies.Company node.</summary>
public class Company {
private System.Int32 attribute_id;
private System.String attribute_name;
private Address element_address;
private List<Contact> element_contacts;
/// <summary>System.Int32 id attribute.</summary>
[XmlAttribute("id")]
public System.Int32 Id {
get { return this.attribute_id; }
set { this.attribute_id = value; }
}
/// <summary>System.String name attribute.</summary>
[XmlAttribute("name")]
public System.String Name {
get { return this.attribute_name; }
set { this.attribute_name = value; }
}
/// <summary>Address xml element.</summary>
[XmlElement("Address")]
public Address Address {
get { return this.element_address; }
set { this.element_address = value; }
}
/// <summary>Contact[] Contacts xml array element.</summary>
[XmlArrayItem("Contact", typeof(Contact))]
[XmlArray("Contacts")]
public List<Contact> Contacts {
get { return this.element_contacts; }
set { this.element_contacts = value; }
}
}
/// <summary>Represents a Company.Address node.</summary>
public class Address {
private System.String element_street;
private System.String element_city;
private System.String element_state;
private System.String element_zip;
/// <summary>String Street element.</summary>
[XmlElement("Street")]
public System.String Street {
get { return this.element_street; }
set { this.element_street = value; }
}
/// <summary>String City element.</summary>
[XmlElement("City")]
public System.String City {
get { return this.element_city; }
set { this.element_city = value; }
}
/// <summary>String State element.</summary>
[XmlElement("State")]
public System.String State {
get { return this.element_state; }
set { this.element_state = value; }
}
/// <summary>String Zip element.</summary>
[XmlElement("Zip")]
public System.String Zip {
get { return this.element_zip; }
set { this.element_zip = value; }
}
}
/// <summary>Represents a Contacts.Contact node.</summary>
public class Contact {
private System.Int32 attribute_id;
private System.String attribute_name;
private ContactInfo element_contactinfo;
private Login element_login;
/// <summary>System.Int32 id attribute.</summary>
[XmlAttribute("id")]
public System.Int32 Id {
get { return this.attribute_id; }
set { this.attribute_id = value; }
}
/// <summary>System.String name attribute.</summary>
[XmlAttribute("name")]
public System.String Name {
get { return this.attribute_name; }
set { this.attribute_name = value; }
}
/// <summary>ContactInfo xml element.</summary>
[XmlElement("ContactInfo")]
public ContactInfo ContactInfo {
get { return this.element_contactinfo; }
set { this.element_contactinfo = value; }
}
/// <summary>Login xml element.</summary>
[XmlElement("Login")]
public Login Login {
get { return this.element_login; }
set { this.element_login = value; }
}
}
/// <summary>Represents a Contact.ContactInfo node.</summary>
public class ContactInfo {
private System.String attribute_email;
private System.String attribute_phone;
/// <summary>System.String email attribute.</summary>
[XmlAttribute("email")]
public System.String Email {
get { return this.attribute_email; }
set { this.attribute_email = value; }
}
/// <summary>System.String phone attribute.</summary>
[XmlAttribute("phone")]
public System.String Phone {
get { return this.attribute_phone; }
set { this.attribute_phone = value; }
}
}
/// <summary>Represents a Contact.Login node.</summary>
public class Login {
private System.String attribute_uid;
private System.String attribute_pwd;
/// <summary>System.String uid attribute.</summary>
[XmlAttribute("uid")]
public System.String Uid {
get { return this.attribute_uid; }
set { this.attribute_uid = value; }
}
/// <summary>System.String pwd attribute.</summary>
[XmlAttribute("pwd")]
public System.String Pwd {
get { return this.attribute_pwd; }
set { this.attribute_pwd = value; }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.