DooDoo
DooDoo

Reputation: 13467

what is the best way to convert a class to xml and vice versa

what is the best way to convert a class to a XML and vice versa?

I want to convert my class to xml for using XRule and I want to convert back it to class with early type of properties.

thanks

Upvotes: 4

Views: 8632

Answers (3)

Dave M
Dave M

Reputation: 1322

XRule sounds like it plays a similar role as an XML Schema (I'm not familiar with it). The XML Schema Definition (xsd.exe) tool allows you to generate common language runtime classes from XML files and vice-versa. More info can be found here.

Upvotes: 1

wsanville
wsanville

Reputation: 37516

You can use XML Serialization to easily go from a class to XML, and the reverse. This tutorial does a good job explaining how to do it, and how to finely craft the resulting XML.

Upvotes: 5

Related Questions