Convert XML String to Object

0 votes

I'm getting XML strings over a socket and want to turn them into C# objects.

The messages use the following format:

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

I'm new to.Net and don't know the best way to go about doing this. I've used JAXB for Java before, and I'm not sure if there's anything similar here, or if it's handled differently.

Jun 11 in C# by krishna
• 2,540 points
37 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In C#

0 votes
1 answer

How do I turn a C# object into a JSON string in .NET

Newtonsoft.json can be used to accomplish this. ...READ MORE

answered Jun 13 in C# by krishna
• 2,540 points
24 views
0 votes
1 answer

How to initialize a list of strings (List<string>) with many string values

Simply remove the () at the end. List<string> ...READ MORE

answered Jun 13 in C# by krishna
• 2,540 points
21 views
0 votes
1 answer

How to convert JSON text into objects using C#

To make a class out of a ...READ MORE

answered Jun 13 in C# by krishna
• 2,540 points
24 views
0 votes
1 answer

How to get substring from string containing newlines

If you want to maintain the newline ...READ MORE

answered Jun 14 in C# by jyoti
• 1,240 points
19 views
0 votes
0 answers

How Convert VB Project to C#

I have a VB project that has ...READ MORE

Jun 11 in C# by jyoti
• 1,240 points
29 views
0 votes
1 answer

Converting dd/mm/yyyy formatted string to Datetime

Sounds to me like you need DateTime.ParseExact ...READ MORE

answered Jul 4 in C# by krishna
• 2,540 points
23 views
0 votes
1 answer

How to parse invalid XML in Java ?

That "XML" is worse than invalid – it's not well-formed; ...READ MORE

answered Mar 7, 2019 in Java by developer_1
• 3,310 points
3,542 views
0 votes
0 answers

Best XML Parser for PHP

I've used the XML Parser before, and ...READ MORE

Jul 29 in PHP by Kithuzzz
• 4,480 points
18 views
0 votes
3 answers

Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,120 points
4,511 views
0 votes
1 answer

Is support XML Canon available in Jenkins?

Here is some information regarding your query ...READ MORE

answered Jun 1, 2018 in Jenkins by Damon Salvatore
• 5,980 points
287 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP