Guest User

Untitled

a guest
Oct 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. <ServerInformation>
  2. <Server Name ="NameServer" ServerPath="PathInServer" information="some values"/>
  3. <Server Name ="NameServer1" ServerPath="PathInServer1" information="some values1"/>
  4. </ServerInformation>
  5.  
  6. /// <remarks/>
  7. [XmlTypeAttribute(AnonymousType = true)]
  8. [XmlRootAttribute(Namespace = "", IsNullable = false)]
  9. public class ServerInformation
  10. {
  11. private Server[] serverField;
  12.  
  13. /// <remarks/>
  14. [XmlElementAttribute("Server")]
  15. public Server[] Server
  16. {
  17. get
  18. {
  19. return this.serverField;
  20. }
  21. set
  22. {
  23. this.serverField = value;
  24. }
  25. }
  26. }
  27.  
  28. /// <remarks/>
  29. [XmlTypeAttribute(AnonymousType = true)]
  30. public class Server
  31. {
  32.  
  33. private string nameField;
  34.  
  35. private string serverPathField;
  36.  
  37. private string informationField;
  38.  
  39. /// <remarks/>
  40. [XmlAttributeAttribute()]
  41. public string Name
  42. {
  43. get
  44. {
  45. return this.nameField;
  46. }
  47. set
  48. {
  49. this.nameField = value;
  50. }
  51. }
  52.  
  53. /// <remarks/>
  54. [XmlAttributeAttribute()]
  55. public string ServerPath
  56. {
  57. get
  58. {
  59. return this.serverPathField;
  60. }
  61. set
  62. {
  63. this.serverPathField = value;
  64. }
  65. }
  66.  
  67. /// <remarks/>
  68. [XmlAttributeAttribute()]
  69. public string information
  70. {
  71. get
  72. {
  73. return this.informationField;
  74. }
  75. set
  76. {
  77. this.informationField = value;
  78. }
  79. }
  80. }
  81.  
  82. XmlSerializer serializer = new XmlSerializer(typeof(ServerInformation));
Add Comment
Please, Sign In to add comment