Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
513 Points
149 Posts
Feb 24, 2012 07:39 PM|LINK
lets say i have a xml file which contains node and data, something like this:
<bookstore> <book category="CHILDREN"> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title>Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>
I would like to find a way to convert this xml to c# class with all the fields and data into class., something like class bookstore has a book class which has fields like title, year, price, and on. i also need data in the class, is it possible?
does anyone has any ideas for this?
thanks very much in advance.
Justin
justindongqi...
Member
513 Points
149 Posts
is it possible to convert a xml to c# classes?
Feb 24, 2012 07:39 PM|LINK
lets say i have a xml file which contains node and data, something like this:
<bookstore>
<book category="CHILDREN">
<title>Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title>Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
I would like to find a way to convert this xml to c# class with all the fields and data into class., something like class bookstore has a book class which has fields like title, year, price, and on. i also need data in the class, is it possible?
does anyone has any ideas for this?
thanks very much in advance.
Justin