Click here to Skip to main content
15,886,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to create class of these xml file.
<Type>Label</Type>
          <Name>Label1</Name>
          <Text>label</Text>
          <X>20</X>
          <Y>30</Y>
          <Width>35</Width>
          <Height>13</Height>
          <Visible>True</Visible>
          <Enable>True</Enable>
  </control>


<control>
         <Type>TextBox</Type>
         <Name>textbox1</Name>
         <Text></Text>
         <X>93</X>
         <Y>30</Y>
         <Width>100</Width>
         <Height>20</Height>
         <Visible>True</Visible>
         <Enable>True</Enable>  </control>


What I have tried:

I don't have any singal idea. How to do this. Even I searched on google. Not getting result
Posted
Updated 13-Mar-17 23:30pm
v2
Comments
F-ES Sitecore 14-Mar-17 5:22am    
google "deserialize xml to object" and you'll find lots of examples.
CHill60 14-Mar-17 5:23am    
What do you mean by "create class of these xml file"? Explain your problem in more detail
Pragya Nagwanshi 14-Mar-17 5:25am    
I have to convert this xml into class
d.gierse 14-Mar-17 5:27am    
if you want to get an object you have to define a class in C# and then you can use XmlSerializer.Desrialize()

1 solution

This CP article should help you along: XML Serialization and Deserialization: Part-2[^]
 
Share this answer
 
Comments
Karthik_Mahalingam 14-Mar-17 5:36am    
5
Pragya Nagwanshi 14-Mar-17 7:24am    
Thanks. I got it.
CHill60 14-Mar-17 7:34am    
:thumbsup:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900