Convert XML String to Object

I am receiving XML strings over a socket, and would like to convert these to C# objects.

The messages are of the form:

<msg>
   <id>1</id>
   <action>stop</action>
</msg>

I am new to .Net, and am not sure the best practice for performing this. I’ve used JAXB for Java before, and wasn’t sure if there is something similar, or if this would be handled a different way.

15 Answers
15

Leave a Comment