简体   繁体   中英

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

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM