tags:

views:

64

answers:

2

I need to convert .NET data to XML types and viceversa and I wonder if there is any class already on the .NET framework to do it.

UPDATE

I want to perform a data type conversion.

+4  A: 

Well there is the XMLSerializer class

rerun
Or the [`DataContractSerializer`](http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractserializer.aspx), for better control.
Oded
@rerun: I think XmlConvert would be more appropriate for this question, but you might be right.
Cesar Lopez
I prefer the data contract serialize but it requires more knowledge to use but is defiantly better in non trival situations
rerun
+3  A: 

XmlConvert class should do it for you.

Cesar Lopez