Hi,
Need some help with an application that I am working with. It's a windows service that is an integration between two different systems. I am listening for events and when an event occur I receive an XML document.
I wan't to serialize that XML document into a C# class with DataContracts.
I have a problem with serializing that XML document because the XML document consists of a XML tag with name object.
1 NorthernLights
- public class object
- {
- [DataMember(IsRequired = true)]
- public Guid Id { get; set; }
- [DataMember(IsRequired= false)]
- public string name {get; set; }
- }
I cannot create a class with name object so I wonder how to solve this?
I cannot change the XML document.
Hakan AxheimPosted Mar 5, 2021, 11:35 AM
[DataContract(Name="object", Namespace="", IsReference=false)]
Then I can create a public class Object
Kiran MohantyPosted Mar 5, 2021, 5:50 AM