The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
Sometimes when integrating between external systems or reading XML from I/O, you might need to deserialize that XML string into a runtime object. Because converting an XML into an object will give lots benefits rather than parsing the XML and then extracting/manipulating nodes.
Luckily, in Visual Studio 2013 there is a new feature that can create a class with its properties on behalf of you according to the passed XML string. So rather than manually writing a class with lots of properties to map your XML structure, Visual Studio 2013 does it for you.
Here is a simple XML sample:
>Hide your heart</
Open a new instance of Visual Studio 2013, create a new C# Project select Console Application.
Change the Target framework to .Net 4.5, this is really important, because this feature only works .Net 4.5 projects.
Add a new Class to the project by right-click the project and go to Add and then select Class.
Keep the existing class name because it will automatically change as we will see now.
Completely remove this code from the Class file and place your cursor between the namespace curly braces like this:
Now from the main menu, go to Edit > Paste Special > Click Paste XML as Class.
And Voila, you have a C# class that represents your pasted XML string. Now you can deserialize your XML strings into memory using an instance of your class.
This feature also applies for JSON and it works if you have Visual Studio 2012 Update 2.
Business Applications communities